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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
rpinxt
Power Participant
Power Participant

Automated action after the dataset has refreshed

Is there a way after the dataset refreshes to export the report as pdf to a location on a network drive?

 

or at least to send a pdf in a email? Maybe the report in the body of the mail?

9 REPLIES 9
lbendlin
Super User
Super User

You can accomplish that in Power Automate by either polling the refresh history (check the presence of an End Date for the most recent entry) or by using a custom connector to initiate an enhanced refresh. That will give you a request ID which you can then use in API calls to ask for the status.

 

lbendlin_0-1683402171474.png

 

Thanks @lbendlin however I cannot find "Refresh Dataset in Group".

 

Guessing that is not the trigger?

When setting up a flow I am asked to choose flow's trigger.
This option is not there.

 

Where the trigger in my opinion would be to see if a dataset changed.

There is no trigger. Everything is done via polling.

Ok @lbendlin , but sorry then I do not understand.

My understanding of Power Automate is not very big.

rpinxt_0-1683715908188.png

 

Guessing your solution then works totally different then other power automate flows.

 

Even not sure if I would achieve what I was after with your solution.

 

I have a report published (also in dekstop) that is on auto refresh.

My goal was to whenever this report was refreshed (so the new data was in) it would get exported as a pdf to a local folder.

 

(Probably sounds lot simpler then it will be in practice 😉 )

Power Automate has a standard "trigger"  for "when a dataflow refresh completes".  It does not have anything equivalent for "when a dataset refresh completes".  You will need to write your own process - as I have shown earlier in the post.  Keep in mind that "completes"  doesn't mean much. You also have to check the result - did it fail or did it succeed?  There may not be a need to continue if it failed (or you may choose to re-request a refresh).

 

You touched on a much deeper, more philosophical question though. Nothing in Power Automate is genuinely triggered. Deep down everything is implemented through polling.

Ok....well then I think this will lead me nowhere because I even don't have this one:

rpinxt_0-1683720158234.png

 

We will have to look into other options to automatically export our report as a pdf and save it to a local folder.

 

Thanks @lbendlin for your time.

for that part you can use the standard action (but you lose the Enhanced Refresh API options)

 

lbendlin_0-1683720654821.png

 

This only requests the refresh, there is no feedback on when it ends and if it was successful.

Hmm yes this is the refresh of the dataset.

 

But the dataset will already automatically refresh.

That refresh would actually be the trigger (sorry for using that word again) for exporting the power bi report to a local folder.

 

Looking into the PBI option in power automate.

See that there are also some power bi triggers.

Not sure if any of them would work for us:

rpinxt_0-1683721319204.png

 

None of them apply to your issue (Note: replace "goal"  with "metric"  - apparently Microsoft doesn't know that Microsoft changed the terminology...)

 

There is an API call that you can use for - you guessed it - polling the refresh history of your dataset. But that requires you to write a custom connector.

 

Datasets - Get Refresh History In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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