Embed PowerApps in PowerBI-Part 3
In this series, so far, we have embedded a Power BI report/tile in canvas app and then in model driven apps. Now we will do the reverse, where we will embed PowerApps in Power BI. When there is more focus on action based on analytics, it makes more sense to embed a business app in PowerBI.
Microsoft has made it so much easier to do this task now since its inception. Earlier, we had to add web content, generate embeddable uri etc. etc. But now, we have a certified PowerApps custom visual in Marketplace which we can import and use it in any of our Power BI reports and dashboards. How cool is that!
Let us go through the steps of creating a simple PowerApps integrated Power BI report.
1) On PowerBI.com, go to the workspace and click on the edit report where you want to add the app
2) On the Visualizations pane, click on PowerApps custom visual, it gets added to the report you were on just like any other visual.
3) Next, set all the fields that you need for the app to function. In my sample, I am using the Dashboard in a day report and I am trying to send an email to each country sales group when I see the sales revenue going down. I am selecting the fields I want to display and also the fields I want to update. In this case, I am updating comments and sending emails using the other fields.
4) Next important step is to make sure you are choosing the right environment for the PowerApps app, whether you are using an existing app or creating a new app.
5) In my case I chose an existing app, it brings up the PowerApps designer as below. Notice that it added PowerBIIntegration object right under App, this is key for this to work
6) Now you have to start linking each of your controls to the appropriate fields you have pulled from PowerBI. For selecting the field values, use First(PowerBIIntegraion.Data).FieldName. You can also have another data source in your app that you can join with PowerBIIntegration.Data object if needed.
7) Now save the app and publish as usual in PowerApps and close the window.
8) Back in the PowerBI report, notice that the PowerApps control will refresh and bring up the latest updates.
9) Now pull the report, started clicking on the linked visual, you will notice that the data in PowerApps custom control will also start appropriately changing.
10) In my case above, the head of the organization sees the sales is declining in a couple countries steadily and quick adds his comments and sends out an email to the sales group for a quick meet and actions!!
Just like any brand new control that is integrating multiple tools, there are a few limitations with this custom control that you can read up here. A few observations during the creation of this sample
- There were times when I ran into issues with the report locking up on me, but soon got resolved by itself and sometimes I had to close the session.
- Sometimes, it looked like the PowerBIIntegration object was not working, but after closing and editing it back from PowerBI seems to resolve the issue
- Another note, if you create an app from PowerBI, it seems like it always add in phone mode, so if you are looking for tablet mode app, I suggest you create one beforehand and then add it through PowerBI
- But all in all, it is definitely very promising control.