Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pmdci
Advocate V
Advocate V

Power BI Embedded - How does it refresh reports?

How can I ensure that Power BI reports published in Power BI Embedded shows the latest data via refresh? How would it work if a report is doing data import or DirectQuery?

 

  • If report is importing data - Does this work with Power BI embedded? How do I configure the scheduling of the data refresh in this case?
  • If report is using direct query - How does it work in Power BI embedded? I know that the gateway works with PowerBI.com service -- but Power BI embedded?

Regards,

P.

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee

@pmdci

 

As far as I know, three ways to refresh the data in Power BI Embedded.

 

  1. If report is importing data, recreate a pbix and re-import it to workspace, no schedule refresh.
  2. If report is using direct query, use Azure SQL database/data warehouse and set the azure credential via REST.
    Patch GatewayDatasource
    Data source connectivity
    Your report would be always up to date, no need to refresh.
  3. Additon to 2, if using direct query to any other on-premises source, there's no gateway supported like in Power BI Service. Say your report is using an on-premises SQL Server, set up an automation process to load the data from SQL Server into the Azure SQL database via an ETL tool like SSIS, then schdule this automation process to run in a certain interval to update the data.

View solution in original post

6 REPLIES 6
DMiradakis
Advocate II
Advocate II

Well, 7 years after the fact is better than never, here's an updated answer for anyone who reads this:

 

This all comes down to the Power BI JavaScript SDK. Specifically, there is a method that is used to refresh a Power BI report, and I want to discuss this for a moment:

.Refresh()

 This JavaScript method behaves differently depending on what type of storage mode your Power BI report is using, either Import Mode or Direct Query.

 

Import Mode

If your report is using Import Mode, then you still have to configure scheduled refreshes.

 

Keep in mind that:

  • Power BI Pro users only get 8 refreshes/day, period.
  • Power BI Premium Per User (PPU) or Premium users get unlimited refreshes/day as long as you have enough compute power to share between the datasets.
    • Yes, yes, it's true that the Power BI Service UI only has 48 dropdown boxes on the web page, BUT you actually get unlimited refreshes/day for a dataset, Microsoft just does not point that out very much in the documentation.
    • Once again, for these licensing types, you actually get unlimited refreshes.

 

Direct Query

There is no refresh limitation with Direct Query, and Microsoft even has Automatic Page Refresh to use with DQ nowadays. However, there is hardly any refresh restriction for DQ when you use this JavaScript SDK that Microsoft has on GitHub.

 

Summary

Here's How .Refresh() Works For Each Storage Type:

  • For Import Mode, .Refresh() does not actually force a refresh. Instead, what it does is check the cached data for that dataset in the Power BI Service, and if it finds new data, it pulls that new data down into your embedded report and forces the visuals to update/recalculate.
  • For Direct Query, .Refresh() actually refreshes your data. It causes queries to be sent out to your datasources as if someone had clicked the Refresh button in the Power BI Service UI.

In both cases, you can call the .Refresh() method from the JavaScript SDK up to every 15 seconds if you desire - so very close to realtime.

 

This is how .Refresh() works in my custom Power BI digital signage app, Displagent. It supports both storage modes and uses that Power BI JavaScript SDK method to force visuals to autoupdate themselves. This is the only way that someone can force visuals to autoupdate themselves when you are using Import Mode.

ddaas
Frequent Visitor

This is not solved.

 

DirectQuery has a lot of limitations.  A PBIX that has imported data can be uploaded to app.powerbi.com and a scheduled refresh ca nbe set up by providing DB connection credentials.  This is a must-have for the embedded option.  The idea of uploading a new file every few hours is ridiculous and not a solution in the real world.

 

Is there a feature request out there somewhere for this?

 

Cheers,

Paul

 


@ddaas wrote:

This is not solved.

 

DirectQuery has a lot of limitations.  A PBIX that has imported data can be uploaded to app.powerbi.com and a scheduled refresh ca nbe set up by providing DB connection credentials.  This is a must-have for the embedded option.  The idea of uploading a new file every few hours is ridiculous and not a solution in the real world.

 

Is there a feature request out there somewhere for this?

 

Cheers,

Paul

 


Feature request for uploading a new file every few hours, Power BI Designer API, with this pbix can be created and refreshed programmable and then sent to Power BI Embedded workspace without human intervention.

 

Another feature request for gateway in Power BI Embedded, with gateways it will be possible to do the same refresh as in Power BI Service.

 

Though it sounds a little ridiculous, if Power BI Embedded is preferred and direct query is not acceptable, that is the only approach. Otherwise use Power BI REST API instead, the pbix is published to Power BI Service and the imported dataset can be scheduled to refresh.

kevhav
Continued Contributor
Continued Contributor

I think I've heard that Microsoft is working on scheduled refreshes of "Import"-mode PBIX files, in Azure workspaces, for Power BI Embedded.

 

Also, there is this idea, where I added the following comment...

 

I'd like to expand on this idea, and give it my votes:

1. I would like to be able to use the UI in the Azure Portal to create/edit/delete Workspaces (and give them friendly names), just like I can do with the Workspace Collections that contain them.

2. Then, I would like to use the UI in the Azure Portal to import/delete/manage the PBIX files (Reports) that are consumed by Power BI Embedded.

And then, for bonus...once such scheduled refreshes are supported...I would like to use the UI in the Azure Portal to schedule refreshes of those PBIX files (for "Import"-type PBIX files, of course -- the ones that do not do "Direct Query"), similar to how I can schedule refreshes in the Power BI Service.

ddaas
Frequent Visitor

This is not solved.

 

DirectQuery has a lot of limitations.  A PBIX that has imported data can be uploaded to app.powerbi.com and a scheduled refresh ca nbe set up by providing DB connection credentials.  This is a must-have for the embedded option.  The idea of uploading a new file every few hours is ridiculous and not a solution in the real world.

 

Is there a feature request out there somewhere for this?

 

Cheers,

Paul

 

Eric_Zhang
Employee
Employee

@pmdci

 

As far as I know, three ways to refresh the data in Power BI Embedded.

 

  1. If report is importing data, recreate a pbix and re-import it to workspace, no schedule refresh.
  2. If report is using direct query, use Azure SQL database/data warehouse and set the azure credential via REST.
    Patch GatewayDatasource
    Data source connectivity
    Your report would be always up to date, no need to refresh.
  3. Additon to 2, if using direct query to any other on-premises source, there's no gateway supported like in Power BI Service. Say your report is using an on-premises SQL Server, set up an automation process to load the data from SQL Server into the Azure SQL database via an ETL tool like SSIS, then schdule this automation process to run in a certain interval to update the data.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.