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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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 I
Resolver I

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors