March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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.
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
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.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
16 | |
13 | |
12 | |
9 |
User | Count |
---|---|
34 | |
31 | |
20 | |
19 | |
17 |