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
mpsrshl
Advocate II
Advocate II

Javascript code to refresh tiles inside dashboard only?

Hey there,

 

Does anyone have some javascript code I can use in the way of a bookmark to make my dashboard's tiles refresh every 60 seconds? 

 

This dashboard is set up as direct query. 

 

I copied one that didn't work perhaps because it was intended for Power Bi Service tiles instead of on Premise. 

 

Thanks! 

 

 

 

2 REPLIES 2
mpsrshl
Advocate II
Advocate II

Hi there,

 

thanks! after much digging on the web I found a script that works. I set it as a bookmark on the browser and save the url of it as this: 

 

javascript:function refreshPowerBI() {this.frames[0].postMessage({ kind: "powerbi.reportServerHost.IToolbarActionMessage", button: "refresh" }, "https://[your instance]/:443")} if (window.autoRefreshInterval) { clearInterval(window.autoRefreshInterval); };window.autoRefreshInterval = setInterval(refreshPowerBI, 30 * 1000)

 

 

I hope it helps other users.

 

 

v-luwang-msft
Community Support
Community Support

Hi  @mpsrshl ,

As it relates to development, I did not find a relevant article, you can refer to the following link and check if it is helpful to you:

https://community.powerbi.com/t5/Service/DirectQuery-Auto-Refresh-Dashboard-Every-60-Seconds/m-p/850... 

 

Best Regards

Lucien

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.