Updated: 2 days ago
"Can I write back to my data source, change specific fields, update data directly from Power BI?"
I hear this question a lot from Power BI users. Power BI is an amazing BI tool to visualise data, but you can go the extra mile if you take advantage of all the capabilities the Power Platform can give you.
Today, we are going to solve the problem just mentioned, we are going to give users the ability to write back to data sources directly from Power BI using PowerApps.
As an example, I will be using a very simple database I created in Azure SQL. This database has data about used cars. Our imaginary Power BI customer wants to be able to change the price of a car directly from Power BI, and have it updated instantly in the report.
This is the current report they have:
To achieve the "instant data refresh", our connection to SQL Server is done using Direct Query.
Now that we explained our scenario example, let's get to action!
1) Adding the PowerApps visual to your report
When it comes to embedding PowerApps in your Power BI reports, there are two options: you can embed an existing app in you report, or create a new one. In this example, I will create a new app for my report.
To do this, I added the PowerApp visual to my report page, added the fields I want to use in my app, and selected "Create New".
To add a PowerApp to your report, follow the steps on the video below:
The fields you choose to add to your PowerApp now will be available for you to use when you're developing your app, in other words, the fields you add to this visual will be the only fields the PowerApp will "understand". I decided to add all the fields I have, just in case!
When you click on "Create New", a message with an "Open Browser" warning will show up. Click OK to open this new browser window: