Become a Dynamics 365 expert with Syvantis Learn
Provide additional details about the offer you're running.
This store requires javascript to be enabled for some features to work correctly.
Provide additional details about the offer you're running.
Embed a Power BI report into your custom Power App
Power BI & Fabric • Power Apps • Power Platform
This Fast Class shows how to embed an interactive Power BI report inside a custom Power App. Starting with CRM data imported into Dataverse, you’ll learn how to connect Power BI to the data using DirectQuery, build and publish a report, pin it to a dashboard, and add that dashboard to a Power App. The class also covers sizing, user access, mobile considerations, performance settings, and other details to consider when bringing Power BI reporting directly into a Power Apps experience.
Power BI and Power Apps can work together to give users on-demand reporting and insights directly within a custom Power App. This lets users access Power BI information on the go, on a website, on a mobile device, or wherever you deliver your Power App. In this Fast Class, we start with CRM data, create a Power BI report from that data, and embed the finished report into a Power App.
Preparing your data in Power Apps
For this example, we’re using a Hello World app from previous Power Apps demonstrations. You can create the tables needed for your Power BI report directly in Power Apps. From the Tables area, you can see the different tables that currently exist in your CRM environment and create new ones. Before adding new tables, check with your system administrator. CRM environments are often highly customized, so it’s important to understand the existing environment before making changes. Power Apps provides several options for creating tables, including:
For this demonstration, we use an Excel file to create the tables.
Importing Excel data
When importing an Excel file, Power Apps automatically detects information from the workbook and creates tables based on that data. You can also define relationships between the imported tables, including parent-child relationships. Keep in mind that AI can be involved in interpreting the imported data. It may rename tables during the import or make decisions about field names and data types. Before completing your import, verify:
Make sure you know what the tables will be called after import so you can easily identify them later. After the import finishes, the new tables will appear among your custom tables. It may take some time for the data to become available in Power BI, depending on the amount of data in your CRM environment.
Connecting Power BI to Dataverse
Next, open Power BI Desktop and use Get Data to connect to Dataverse. You’ll be able to see the Dataverse environments available in your Microsoft 365 tenant. Select the appropriate environment and then choose the table containing the data you want for your report. For this example, we load the sales order data without performing additional transformations. The connection is configured using DirectQuery. With DirectQuery, changes made to the data in Dataverse can be reflected in the Power BI report. For example, if a Power App changes data in Dataverse, such as adding a sales order or approving something, those changes can carry over to the report. However, DirectQuery does have trade-offs. Certain Power BI functions may not be available, and you can experience lag if you’re working with a large amount of Dataverse data. For the use case demonstrated in this class, DirectQuery works well.
Setting the Power BI canvas size
Before building the report, it’s important to configure the canvas dimensions. Power BI uses fixed dimensions for its visuals and canvas, while Power Apps can dynamically adjust based on the device being used. If the dimensions don’t line up correctly, your embedded report may not look quite right. In this demonstration, the Power BI canvas is set to a custom size of:
Knowing the size of the area where the report will appear in your Power App helps you design a Power BI report that fits the available space.
Creating the Power BI report
With the data and canvas configured, you can begin adding visuals. In this example, the report includes:
The goal is to create a compact report that provides useful information while fitting comfortably inside the Power App.
Publishing the report
Once the report is ready, select Publish in Power BI Desktop and choose the appropriate Power BI workspace. After publishing, open Power BI in your browser. The report should now be available in the workspace. There is one more important step before Power Apps can use it: the report needs to be pinned to a Power BI dashboard. Open the report, select the appropriate options, and choose Pin to a dashboard. You can create a new dashboard if necessary. Power Apps can then access the Power BI content from that dashboard.
Setting up user access
Before adding the report to your Power App, configure access to the Power BI workspace. Open Manage access and add the appropriate people or groups. End users who only need to see the report can be added as viewers. The developer responsible for working with and embedding the report will need the appropriate permissions to manage the content. User access is an important part of the process. Make sure the people using your Power App also have the necessary access to view the Power BI content.
Adding the Power BI tile to Power Apps
With the report published and pinned to a dashboard, return to Power Apps and edit your app. Create or open the screen where you want the report to appear. From the Insert menu, add a Power BI tile. Power Apps will then allow you to select the workspace, dashboard, and tile you want to display. After selecting the Power BI content, the report appears directly inside the Power App.
Adjusting the report size
You may need to resize the Power BI tile after adding it. Because Power BI relies on fixed dimensions while Power Apps can respond dynamically to different screen sizes, getting the sizing right can take some adjustment. This is why setting the Power BI canvas dimensions earlier is important. Designing the report around the dimensions you expect to use in Power Apps makes it easier to achieve a readable embedded result.
Enabling Power BI interactions
The Power BI tile includes a setting that enables Power BI interactions for users. When enabled, users can interact with the embedded content in much the same way they would interact with it in Power BI. You won’t necessarily see all of this behavior while working in the Power Apps designer. Use the Play button to preview the app from a user’s perspective. In the demonstration, users can interact with the report, adjust the slicer, and see the KPIs and other visuals update accordingly. These interactions can also be used on mobile devices.
Understanding the Allow New API setting
The Power BI tile includes some advanced settings that you don’t normally encounter with other Power Apps controls. One is Allow New API. At the time of this Fast Class, enabling this setting can cause Power BI tiles to have problems on mobile devices. If your Power BI content isn’t working correctly on mobile, this is one of the settings to check. The newer Power BI API can provide better filtering, but mobile support may affect whether it is appropriate for your scenario.
Managing Power BI content for performance
Another useful setting is Load Power BI content. This setting determines when Power Apps keeps the Power BI report loaded in memory. If users don’t need the report all the time, you can control this value so the content is unloaded when it’s not required and loaded again when users need it. This can help improve app performance, particularly if the embedded Power BI content is resource intensive. As you build your app, monitor its performance and consider unloading the Power BI content when users aren’t actively using it.
Power BI tile limitations
There are also deployment limitations to consider when using Power BI tiles inside Power Apps. As covered in the class, Power BI tiles are not supported in some environments, including China and government cloud scenarios. Make sure your deployment environment supports the functionality before designing a solution that depends on embedded Power BI tiles.
Bringing Power BI and Power Apps together
By combining Power BI and Power Apps, you can provide users with reporting and business data directly within the application they already use to complete their work. The overall process is:
With the two tools working together, you can create Power Apps that give users access to interactive reporting wherever they need to work.
* This transcript summary has been generated from the Fast Class video by Microsoft Copilot. The Fast Class itself was prepared and taught by Syvantis expert consultants.
TUNE INTO THE LIVE CLASS
Ask your questions and get real-time responses from your trusted Syvantis consultants.
What's on the schedule?
Dynamics 365 Business Central
Dynamics 365 Sales (CRM)
Dynamics 365 Customer Insights
Power Platform
Keep learning...
Business Process Designers. Technical Experts. Dedicated Partners.