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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
unknowwwnn
New Member

a pop up message appear after specific queries are refreshed

Hi guys.

 

Could anyone know how I can achieve to have a pop up message appear after a specific queries are refreshed? 

 

I have multiple queries and but I only like to refresh a few queries and would like to have a pop up message once done.

 

unknowwwnn_0-1715701466521.png

 

3 REPLIES 3
ferryv
Resolver II
Resolver II

As it looks like you're using Excel VBA, could you not just add e.g. the following (i.e. a Message box or similar) after the refresh operations?

 

MsgBox "Queries refreshed" 

 

@unknowwwnn | @ferryv - It has been a long time since I used Excel for this type of refresh since Dataflow were added to Power BI.

 

So if you are using VBA to refresh Power Query in Excel, I think this suggestion is partially correct because Excel may not wait until the previous refresh is completed before starting the next or showing the MsgBox.

 

The trick is to turn off Background Refresh so Excel stop to wait for the refresh to complete.  I believe the setting applied to the Query.  This is similar pattern that you need to adoption.

 

Sub Test()
Dim con As WorkbookConnection

For Each con In ThisWorkbook.Connections
    If InStr(1, con.Name, "Query -") Then
        With con.OLEDBConnection
            .BackgroundQuery = False
            .Refresh
        End With
    End If
Next
End Sub


  

v-junyant-msft
Community Support
Community Support

Hi @unknowwwnn ,

First of all, if you want to refresh only some of the queries but not all of them, you can choose to uncheck "Include in report refresh" for the queries that don't need to be refreshed.

vjunyantmsft_0-1715734951216.png

https://learn.microsoft.com/en-us/power-bi/connect-data/refresh-include-in-report-refresh#excluding-... 

Additionally, Power BI itself does not support triggering a pop-up message directly after a query refresh in a Power BI Desktop or Service environment. However, by using a combination of Power BI features and external tools such as Power Automate, a similar result can be achieved.
You can try using the Power BI REST API to programmatically trigger refreshes for specific datasets and then monitor the status of these refresh operations.
Enhanced refresh with the Power BI REST API - Power BI | Microsoft Learn
Alternatively, you can create a stream in Power Automate that listens for the completion status of a dataset refresh and then notifies the user using a Send Email action or similar.

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

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors