cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kcu07jp2
Level: Powered On

Create PowerBI chart using collection data in Powerapps??

Can you create a PowerBI chart using collection data in Powerapps and embed it into your app?

 

Powerapp chart is very limited.

 

Thank you 

1 REPLY 1
PowerApps Staff mobaky
PowerApps Staff

Re: Create PowerBI chart using collection data in Powerapps??

Hey @kcu07jp2,

 

As far as I know, it's not possible to use the powerbi charts with the collection data directly but if your data is obtained from an external source you can slightly redesign your application to make it work using the PowerBi tile control and be able to pass a filter parameter from powerapps. Now it's still a work in progress but here is a way that this can be done:

 

Let's say we import your data into PowerBi and it looks something like this:

 

data pbi.PNG

 

and you want to visualize it on a map and be able to interact with it in you powerapp.

 

  1. First thing you need to do is add a Map visual that displays the population of each city in canada and a slicer (optional) to help you see what it would look like when you filter by province.map data.PNG
  2.  Then you will need to add a PowerBi tile control to your powerapp. Once the tile is on the canvas, another pane opens up that asks you to choose a workspace, dashboard and a tile from that dashboard to be displayed in the PowerApps Power BI tile.pan powerbi.PNG

     

  3. if you check the control TileURL property you should see : 
    "https://msit.powerbi.com/embed?dashboardId=<DashboardID>&tileId=<TileID>&config=<SomeHash>"
     so in order to pass a filter parameter you will need to append it in the following format:  
    &$filter=<My table name>/<My column name> eq "<Value>"
    Note: try not to have any spaces in your table and column names                                                                                                                                                       
  4.  So for this example I will add a listbox which I will populate with the province names from my datasource  powerapps pbi.PNGAnd my goal is to filter the Map by province.
  5. In the listbox's OnSelect property :
    Set(Filter,
        If(ListBox1.Selected.Abbr = "all",
            "",
            "&$filter=Town/Province eq '" & ListBox1.Selected.Abbr & "'"
        )
    )
     
  6. Finally update the TileUrl property to include your filter:
    "https://msit.powerbi.com/embed?dashboardId=<DashboardID>&tileId=<TileID>&config=<SomeHash>" & Filter
  7. Result:result.PNG

      

    Hope this helps 🙂

 

 

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 327 members 5,899 guests
Please welcome our newest community members: