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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.