cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
smpa01
Super User
Super User

Fire a query upon dataset refresh in PA

@mahoneypat  Is it possible at all to fire an automated cloud flow in PA upon successful dataset refresh?

I don't see any trigger at all. It is possible to fire a query, just don't see the trigger at all.

 

Am I missing something, doing something wrong? Is there a way out? 

I need to know how to trigger a query upon dataset refresh, required for archiving and subsequent comp.

 

smpa01_0-1662742256622.png

 

Thank you in advance.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


1 ACCEPTED SOLUTION
mahoneypat
Microsoft
Microsoft

There isn't an OOB trigger for that, but here are 3 approaches to consider:

 

1. Trigger your refresh with Power Automate (based on a schedule or some other trigger), wait the time needed to refresh, and then do your other actions.

2. Create a simple dashboard from your dataset with a simple Alert that is always true (e.g., # rows >0), and then use that Alert to trigger your flow.

3. Use the refresh history Power BI REST API and run it at the needed frequency, parse the response to detect if the refresh is complete for that dataset with a condition, and then add your actions on the true.

 

#2 is probably the simplest/best approach

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Microsoft
Microsoft

There isn't an OOB trigger for that, but here are 3 approaches to consider:

 

1. Trigger your refresh with Power Automate (based on a schedule or some other trigger), wait the time needed to refresh, and then do your other actions.

2. Create a simple dashboard from your dataset with a simple Alert that is always true (e.g., # rows >0), and then use that Alert to trigger your flow.

3. Use the refresh history Power BI REST API and run it at the needed frequency, parse the response to detect if the refresh is complete for that dataset with a condition, and then add your actions on the true.

 

#2 is probably the simplest/best approach

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


I would call #2 a hack (but a nice one).  Personally I use #3.

lbendlin
Super User
Super User

Needs more details. Are you initiating an enhanced refresh request or a standard request?  

 

Chris Webb's BI Blog: Calling The Power BI Enhanced Refresh API From Power Automate, Part 4: Getting...

 

For a standard request you need to do similar polling but instead of using a requestid you need to poll the history (ideally with $top=1) .

Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.