Saturday, 23 March 2019

Power Apps Snack: Refresh Power BI (automatically)

Case
A while ago we blogged about the integration of PowerApps and Power BI. This allows you to change data from within your Power BI report! One downside was that you still had to refresh the Power BI data manually (or by using the API and Flow). How can you automate the refresh?
The new PowerApps Visualization in Power BI





















Solution
Microsoft recently updated PowerApps with the ability to refresh Power BI. Now you can add the refresh command PowerBIIntegration.Refresh() right after your SubmitForm or Patch command. That is all!
PowerBIIntegration.Refresh()













Note: For me it didn't work for existing PowerApps. I had to create a new PowerApp to get the refresh option available. We will follow up on that.
Update 25-03-2019: The Refresh() function gets added to PowerApps from the visual on creation. Therefore it will not be available for existing PowerApps. The workaround for now is creating a new app and then copy and paste the items from the existing app. Please upvote this uservoice request.

Refresh without clicking on the Refresh button in Power BI













Summary
Finally we have an even better integration of PowerApps and Power BI. No more clicking on refresh buttons. Also note the new PowerApps Visualization in Power BI. It got a total makeover with some handy explanations about the integration of both tools. See the top picture. Also see this link for more PowerApps updates

5 comments:

  1. I am getting used to Power BI but I am completely new to PowerApps, and I found this article really helpful (keep using animated gifs!). 100% we will be using it in the near future. Thanks.

    ReplyDelete
  2. Hi,

    Scenario: updating the database from PowerApps form and call refresh update my data in the database (confirmed with query).

    But the Power BI visuals are not updated simultaneously ( am using DirectQuery for Azure Sql Server).

    Specification: Using Power BI Pro (Trail Version).

    Question: Is refresh Power BI only available in paid version not in pro ?

    ReplyDelete
  3. Hello Joost,

    is it possible to provide the Pbix file? I'm having trouble with identifying the '[dbo].[Forecast]' values for my own model.

    Many thanks in advance!

    ReplyDelete
  4. Is that 'Patch(...' code necessary to include? I just have 'PowerBIIntegration.Refresh()' called for 'App' -> 'OnStart' and it doesn't work. Also tried adding that method on a button's 'OnSelect' property but didn't work there either.

    ReplyDelete
    Replies
    1. Yes, Patch is the update command for the database. After that you refresh PBI

      Delete

All comments will be verified first to avoid URL spammers. यूआरएल स्पैमर से बचने के लिए सभी टिप्पणियों को पहले सत्यापित किया जाएगा।