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?
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.
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.
Ok @lbendlin , but sorry then I do not understand.
My understanding of Power Automate is not very big.
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:
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)
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:
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.
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.