Interactive Charts & Reports With Power BI Tiles In Power Apps

Interactive Charts & Reports With Power BI Tiles In Power Apps



Power BI is the most popular Power Platform service and for good reason – it provides simple interactive reports and dashboards that allow organizations to understand their data. Wouldn’t it be great to extend Power Apps very limited set of charts with some of Power BI’s functionality? With Power BI tiles we can make this happen. In fact, if you already have a Power BI Pro license I believe Power BI tiles are the best option for displaying charts in Power Apps.

In this article I will show you how to use Power BI tiles in Power Apps to make interactive charts as well as show full Power BI reports inside an app.

Table of Contents:
Introduction: The Procurement Analysis App
Create A Power BI Report
Pin A Chart To The Dashboard
Add A Power BI Tile To Display A Chart
Apply A Filter To A Power BI Tile With A Dropdown
Display A Full Interactive Power BI Report In Power Apps




Introduction: The Procurement Analysis App

The Procurement Analysis app is used by an automobile manufacturer to analyze supplier data. Employees can view a chart showing vendor invoice totals and filter by the month.



Create A Power BI Report

In this app we will use a sample Power BI Report from Microsoft called Procurement Analysis. You can download it for free from the Microsoft Documentation website.



Open the report in Power BI and click the Publish button.



Once the Power BI report is published open it in Power BI Online.




Pin A Chart To The Dashboard

To use a Power BI chart inside of Power Apps it must be pinned to a dashboard. Select the Total Invoice By Sub Category chart and press the pin icon.



Pin the chart to a new dashboard called Procurement.



The chart now appears on the dashboard.




Add A Power BI Tile To Display A Chart

Now we are ready to build the app. Open Power Apps Studio and create a new tablet app from blank. Insert a Power BI Tile onto the screen.



Choose the Workspace, Dashboard and Tile where the Total Invoices By Sub Category chart is found. The Power BI chart now displayed in the app.




Apply A Filter To A Power BI Tile With A Dropdown

Employees at the automobile manufacturer can choose a month from a dropdown and view results for only that month in a chart. Create a new dropdown and place it alongside the chart.



Write this code in the Items property of the dropdown to populate it with the short names of months.

[
     "Jan",
     "Feb",
     "Mar",
     "Apr",
     "May",
     "Jun",
     "Jul",
     "Aug",
     "Sep",
     "Oct",
     "Nov",
     "Dec"
 ]



Now select the Power BI tile and change the AllowNewAPI property to true. The code to filter the Power BI tile will not work unless you do this.

true



Then append this code to the TileURL property of the Power BI tile. It will filter the chart to show only records where the Date/ Mon (table/column) equal the selected dropdown value.

&filter=Date/Mon eq '"&drp_Month.Selected.Value&"'"



The full TileURL code should look something like this.

"https://app.powerbi.com/embed?dashboardId=1a98a57b-0639-4346-b3a3-f75537fc8b6c&tileId=87d1d742-8a96-4ddd-9495-b5cb8ffd44c0&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly9XQUJJLUNBTkFEQS1DRU5UUkFMLXJlZGlyZWN0LmFuYWx5c2lzLndpbmRvd3MubmV0IiwiZW1iZWRGZWF0dXJlcyI6eyJtb2Rlcm5FbWJlZCI6ZmFsc2V9fQ%3d%3d&filter=Date/Mon eq '"&drp_Month.Selected.Value&"'"



Test the report filter. When we click the dropdown it should change the Power BI tile to display new results for the selected month.




Display A Full Interactive Power BI Report In Power Apps

Another option is to display the full Power BI report in Power Apps. To do this, go open the Power BI report and get the embed code for a website or portal.



Copy the secure embed code.



Then create a new Power BI tile in Power Apps and paste it into the TileURL property. Make sure the enclose the embed code between a set of double-quotation marks to make it a text string.



A fully interactive Power BI report is now displayed in Power Apps.





Questions?

If you have any questions or feedback about Interactive Charts & Reports With Power BI Tiles In Power Apps please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.

Matthew Devaney

Subscribe
Notify of
guest
8 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Ignacio
4 months ago

Nice Post. It’s really interesting. I’m curious to ask more 🙂
How about sharing? If we add a tile in the PowerApp, can any user in the PowerApp see the data? or do you need to share the dashboard with the user and assign a Pro Licence?
Do you know if there is any approach to use the PowerApps without a pro licence? like PBI Embed capacity?

Last edited 4 months ago by Ignacio
Peter
Peter
2 months ago

Hi Matthew,
I’ve been trying to export an embedded Power BI report (filtered report view not default report view) to PDF from PowerApps using the Power Bi connection in PowerApps (not power automate). i still cannot successfully do that. I was wondering if you have tried that?
Thanks

Peter
Peter
2 months ago

Can you export a Dashboard tile as pdf without using power automate?

Arkady Shakhnovich
Arkady Shakhnovich
18 days ago

I added new dashboard and don’t see it in PowerApps. Also, pinned new tiles yo old dashboard and don’t see them in Powerapps ether. Close and open Power App does not help. What I am doing wrong?

Arkady Shakhnovich
Arkady Shakhnovich
8 days ago

thanks. Another question. How actually filter works? I don’t see any code on drop down Onselect? Another words: how clicking on drop down fire report to pick new value?

Thanks