cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
servicetagapp
Frequent Visitor

Power Bi Embedded - Programmatically Refresh Dashboard

Hi,

I can show the dashboard embedded in my webapp. I use the Power Bi client for Java to get AccessToken and EmbeddedURL, then I use the Power Bi client for Angular to embed the report in the gui.

 

I would like to programmatically update my embedded dashboard after a certain time set by the user. I was able to integrate this functionality for embedded reports using the "refresh" method of the client for Angular. For the embedded dashboards I saw that there is the "reload" method of the library. This however reloads the dashboard but the updated data are not shown.

Regarding this issue I have noticed that the data in the dashboard sometimes does not even update in the power bi web service.

Could someone tell me, if possible, the correct way to set this feature?

 

Thanks for support

6 REPLIES 6
v-lionel-msft
Community Support
Community Support

Hi @servicetagapp ,

 

v-lionel-msft_0-1619686821228.png

The scheduled cache refresh is used to refresh the tile cache. Has your refresh plan been executed successfully every time? After it is executed successfully at a certain point in time, then load the dashboard again and check whether the dashboard displays the latest data.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

After refresh il executed successfully the dashboard is still not updated, but when i trigger the dashboard refresh from power bi service, then dashboard shows latest data

If I disable scheduled refresh, then dashboard does not keep cache and refresh each time it is loaded?

Thanks for support

Best regards

v-lionel-msft
Community Support
Community Support

Hi @servicetagapp ,

 

"Regarding this issue I have noticed that the data in the dashboard sometimes does not even update in the power bi web service."

 

Can the datasets that make up the dashboard be refreshed normally? Dashboard refresh (Tile refresh is done automatically).

Tile refresh 
What is your data source? What is your connection mode?

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi

My datasource is a SQLServer connected by DirectQuery

Dataset refreshes with a delay of 2 hours.

Thanks for support

Best regards

Hi @servicetagapp ,

 

"Dataset refreshes with a delay of 2 hours."

 

For Direct Query mode, the queries is not actually sent to the dataset (the dataset is empty in this mode), the queries is sent to the data source for calculation and returned to the report, so when you load the report or interact with the report, the report shows the latest data from the data source, so the 2 hour delay is strange.
The data of tiles in the dashboard comes from the cache of each tile. I think the reason why your dashboard is not updated is that the cache of tiles is not updated in time.
The most critical problem should be the 2 hour delay you mentioned.

Could you explain in detail how the delay of 2 hours is generated?

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @v-lionel-msft,

I have set the dataset scheduled refresh in power bi service with a delay of 2 hours.

servicetagapp_0-1619601173525.png

 

When I load the report or interact with the report, the report shows the latest data from the data source: this works well.

However, whem i load the dashboard, the dashboard does not show the latest data from the data source, like the report does.

How can i manage the cache of tiles so that dashboards show always the latest data?

 

Thanks for support

Best regards

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors