Power Apps

Interactive Charts & Reports With Power BI Tiles In Power Apps

Interactive Charts & Reports With Power BI Tiles In Power Apps Posted by - Matthew Devaney on - September 12, 2021 23 Comments Power BI is the most popular P...

Matthew Devaney
Published
Reading time
4 min read

Before you start

Is this guide for you?

Best entry point
Power Apps
Time investment
4 min read

Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/interactive-charts-reports-with-power-bi-tiles-in-power-apps/. Author: Matthew Devaney.

Interactive Charts & Reports With Power BI Tiles In Power Apps Posted by - Matthew Devaney on - September 12, 2021 23 Comments

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" ] Code language: JSON / JSON with Comments ( json )

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 Code language: JavaScript ( javascript )

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&"' " Code language: JavaScript ( javascript )

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& "'" Code language: JavaScript ( javascript )

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. Did You Enjoy This Article? 😺

Subscribe to get new Copilot Studio articles sent to your inbox each week for FREE Enter your email address Sign Me Up 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. Charts Power BI Matthew Devaney M365 Copilot Power Apps

How To Create Copilot Custom UI Widgets In Power Apps

Share this

Tagged

Power Apps

Have a Microsoft 365 topic idea?

Share article suggestions, community session ideas, corrections, or real-world scenarios for future nxtM365 learning notes.

Suggest a topic

Keep learning Microsoft 365

Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.

Continue learning

Next action

What to do next

Browse all tutorials →