Displaying Power BI Reports in Power Pages

Leave a comment

Power BI reports can be displayed in Power Pages, which is very useful if you want to give your portal users access to the rich reporting features of Power BI. In this post, we will look at how to set up and use Power BI reports in Power Pages.

First, we will use some workspaces and reports from this post where we looked at how to use Power BI reports in the Dataverse in 2024.

Now, I have a Power Pages site where we will build and test connecting to Dynamics 365 Power BI reports through a couple of different connections (Import and DirectQuery). We will also see if there’s any differences with the speed in Power Pages.

Add a section if one doesn’t already exist, then select the ellipse and Under Connected to Data select Power BI:

Select Edit Power BI:

You may see this message if you are doing this the first time – “Power BI is not enabled for this portal. Enable it from the admin center”:

Go ahead and click on Open the admin center. This will take you to your website:

And you will see the section Services, which have the option for Power BI Visualization and Power BI Embedded Service:

From the documentation:

  • Power BI Visualization allows you to embed dashboards and reports using the Liquid tag.
  • Power BI Embedded allows you to embed dashboards and reports created in the new workspace of Power BI. The dashboards and reports are embedded in Power Pages by using the Liquid tag.

Let’s enable Power BI Visualization:

Once this is complete, refresh the Power Pages designer and select the Edit Power BI link again. We see there are 3 options to embed a report:

  1. Embed for your customers
  2. Embed for your organization
  3. Publish to web

Each of these has different considerations that we will talk about.

Embed for your Customers

This option is for the Power BI Embedded Service, which is meant for ISVs and Developers who want to embed Power BI into their own apps.

The steps are basically as follows. Select the access type:

Go to the Admin center and enable the Power BI Embedded Service:

Select Enable:

Click on Edit Workspaces:

I have a workspace that is called My Embedded Workspace, which I am enabling:

Enter the workspace, type (dashboard or report), page, and the option of role and filter:

In the Power BI Service there is the option for the Embed Report->Developer Playground:

The playground gives you tools to build and test your embedded report:

Embed for your Organization

Embed for your organization uses AAD (Entra) authentication. Let’s select a workspace we created earlier, Dynamics 365 Reports, and we get to choose a Dashboard or Report to embed:

We will select Dashboard for this part of the demo, and we see we can choose to display all tiles from the dashboard or specific tiles. We will select all tiles and click Done:

And let’s add another one to the same page to just display a Report:

Note the option to apply a filter to the report.

I see the message in the designer, but it doesn’t seem accurate as my dashboards and reports are working in the portal. The designer message is “power bi feature is disabled in the portal admin center”:

Now, when I go to my actual portal, I see the message to sign into Power BI:

After using my AAD to sign in, I see my Dashboard and my Report. Note the report uses DirectQuery to the Dataverse and the visuals did take some time to load (I changed this to a report I created on Import mode and the speed was great):

Publish to Web

This option allows us to publish a fully public Power BI report, so anyone on the internet can access it. You do not want to use this option for sensitive data. When we select this option, we are prompted for an embed code URL:

To get this URL, we head back to the Power BI service, select a report, and then File->Embed report->Publish to web (public):

You may encounter this message – “To publish this report on the web, ask your Power BI admin if they will allow you to create new publish to web embed codes. Once they turn that on, you will be able to publish this report to the web”:

If you encounter this, go to the Power BI Admin portal and enable “Allow users to create new embed codes”. You can specify if you want this applied to the whole org or to specific security groups:

Back on the report, you should now be able to publish to web:

And then click Publish:

We now have a link that we can embed in a website or email:

Note, we can set the size:

As well as a placeholder image and the default page of the report:

The embed code is an iFrame that looks something like this:

The one we will want when embedding in Power Pages through the section widget is the email link:

Paste that into the textbox and click Done:

Sync the changes, and our report is now public:

Note these reports work on your phone’s browser as well.

You can manage the embed codes in the admin center if you need to disable publish to web:

So we can see there’s a few options to use Power BI reports inside Power Pages, it all depends on how your organization is interacting with your users.

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *