Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

Detect when powerBI query, refreshHostData() is done



During the interaction of our visual, the user may trigger a call to refreshHostData(). Shortly after execution of this, data in the host report is updated. This works fine, except if the user triggers refreshHostData() and then immediately manipulates the visual. It can lead to a "soft-lock" state.


I would think the solution is to detect when refreshHostData begins, lock user interactions, and then unlock when finished. However, it seems that refreshHostData() executes almost immediately, meaning that the update (indicated by the small loading icon in the corner) is executed by something else. If I had to guess, the chain probably goes: refreshHostData() => Update PowerBI => visuals are (re)updated


I don't know how to "track" when an update is coming to the visual and lock for interactions until it has happened. As far as I can tell, the IVisualHost update is only executed after the query.


Is it possible to "monitor" the effects of refreshHostData()? I can't find any documentation on it.


Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors