Refresh a Power BI report from an embedded Power Apps visual

In a recent blog post, I discussed how we can embed a Power Apps app into a Power BI report to enable business users to take action on the insights we deliver using a Power BI report right there and then ✅ But what… READ MORE [https://lewisdoes.dev/blog/refresh-a-power-bi-report-from-an-embedded
shallow focus of clear hourglass
Photo by Jordan Benton on Pexels.com
In: Low Code Lewis Content 🚀

In a recent blog post, I discussed how we can embed a Power Apps app into a Power BI report to enable business users to take action on the insights we deliver using a Power BI report right there and then ✅

But what if users take action that then causes that data to update? Well in those cases we’ll need to update the data in our Power BI report. So in this blog post, I’ll show you how to make a change to those embedded apps to ensure data in Power BI reports updates when you take an action in that embedded app!

Prerequisite

So, for this to be possible you must ensure that you’re working with your data using the Direct Query form of connection. This will not work with imported data to Power BI.

Scenario

So in this very very simple scenario, I have a count of Checkup records and a table of them shown in my Power BI report. In a real life scenario, I’d obviously want to get more out of my data but we’re just looking at the capability to refresh data here.

All I’m saying with regards to the screenshot above is the data is NOT accurate! Now I’m going to add a very simple Power Apps app to my report which has a new form for me to fill in a new record and submit it to the dataset.

Power Apps – Refreshing the Power BI Report

Now before I save and publish my app and head back to my report to see it populated in there as a visual, let’s take a look at how I’m going to manage to refresh my Power BI report when something happens in my Power Apps app.

In this app I’m simply creating a new record and submitting it when a button is selected. When that button gets selected I also want the report to refresh with the new data.

Let’s take a look at the Power Fx to refresh the report. In my on select button I’m using the following Power Fx to execute the refresh.

PowerBIIntegration.Refresh();

That’s it! Just a simple one liner to refresh my report in the Power BI service.

Testing it out

So now, when I submit a record in my embedded Power Apps app, my report should refresh, the count should go up and the table should show my new record. Before this will work, we need to publish the report in the Power BI service. This functionality is not supported in Power BI desktop.

Okay so now with the report in the Power BI Service, check this out!

I’m automatically updating my report based on something which happens in my embedded Power Apps app! So now, my users can take actions on things directly in reports, and see the data updated as soon as they take those actions.

Did you like this content? 💖

Did you like this content? Check out some of the other posts on my blog, and if you like those too, be sure to subscribe to get my posts directly in your inbox for free!

Subscribe
Written by
Lewis Baybutt
Microsoft Business Applications MVP • Power Platform Consultant • Blogger • Community Contributor • #CommunityRocks • #SharingIsCaring
Comments
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to LewisDoesDev.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.