Forum Discussion
Automatic report refresh and send report as PDF
It's a long time since this original post now and this may come too late, but I think I found a solution to this today. There may also be less convoluted ways to do this.
Here's the overview.
1) Firstly, I created a simple measure in my Power BI report which indicated whether the report had been refreshed on that day or not. It gave a 1 if it had been refreshed and a 0 if it had not been refreshed.
2) I then created a Power BI metric and pointed the "current value" to my 1 or 0 measure.
3) After this, I created my Power Automate flow and used the "when current value of a goal changes" Power BI goals connector to point to my Metrics scorecard / metric.
4) Following this, I used the "get a goal" Power BI goals connector to get the specific current value of the goal - i.e. 1 and 0. I then added a condition to check if the goal current value was 1 or 0, and if it was 1, then it would trigger the "Export to File for Power BI reports" connector and "Send email" processes.
This works well because it only runs if both of the following are true:
- The goal has been updated (i.e. changed from 0 ->1 or 1->0) AND
- The value is 1 (i.e. the data was updated today).
Let me know if this helps. I can provide more detail if needed.
- Anonymous3 years agoNot applicable
Further to this, I've now created a full blog post about this topic: robhawkerdata.com/2022/10/31/automatic-power-bi-report-distribution-after-dataset-refresh/
The blog provides a slightly different solution to the one I originally proposed. I think its easier / more robust.