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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JBorja
Frequent Visitor

Power Automate Dataset Refresh, Last Refresh Date

Hello all,

 

I have a report in which I've embedded a Power Automate button that refreshes the Dataset when clicked.

 

I want to have a "Last Refreshed" date/time stamp to let the user know how fresh their data is and indicate a refresh failure. The main method I have found and tried is creating a query with DateTime.LocalNow() then using a card to display the time. This works great when I use the Refresh option within Desktop. However, this does not update when I use the Power Automate button. I am certain the Dataset refreshed because the refresh timestamp is updated in my workspace.

 

Does anyone know a solution?

4 REPLIES 4
pradeep_kare12
Resolver I
Resolver I

In this where the last refresh date time stamp does not update when using the Power Automate Button, is expected, when you use the refresh option within pbi desktop, it updates the date time. LocalNow() value because it's running within the context pf pbi desktop. When you are trigger a refresh using Power Automate or any other external method, it wont update the datetime.LocalNow() value in PBI report because the report and the refresh process are separate.

 

Use a data source timestamp, the load the timestamp into your model and after that display the timestamp in your report.

 

 

In Power Query go to Home after that Manage Queries after that New Source and Blank query and in the formula bar add DAX in which create a calculated table with the "Last Refreshed" timestamp.

 

 

let
Source = #table({"Last Refreshed"}, {{DateTime.LocalNow()}})
in
Source

 

 

Click on done to create the query, and then load it into ypur data model. In your report, use a card visual to display the "Last Refreshed" timestamp from the calculated table.

lbendlin
Super User
Super User

 

a Power Automate button that refreshes the Dataset when clicked.

 

No, it doesn't.  All it does is request a dataset refresh.  There is no guarantee that the request will be honored, and no guarantee as to long it will take or if it will be successful.

 

 

I want to have a "Last Refreshed" date/time stamp to let the user know how fresh their data is

 

That's the right idea but the wrong approach.  Ignore all the dataset refresh stuff. Find a data point in your actual date (for example "Latest order date") and use that to indicate the freshness of the data.

 

All the other timestamps are pointless at best and misleading at worst.


No, it doesn't.  All it does is request a dataset refresh.  There is no guarantee that the request will be honored, and no guarantee as to long it will take or if it will be successful.


If the dataset in the workspace shows the refresh timestamp as the time of the button click, that indicates a successful refresh, right? If so, the button has been operating as intended. Part of my intention with the timestamp is to indicate such failed requests.

 

That's the right idea but the wrong approach.  Ignore all the dataset refresh stuff. Find a data point in your actual date (for example "Latest order date") and use that to indicate the freshness of the data.

 

All the other timestamps are pointless at best and misleading at worst.


The dataset doesn't contain any such dates.

 

I appreciate your advice on best practices, and I'll likely implement them in future practices, but I'd really just like to know if there's an equivalent solution to having the query for DateTime.LocalNow() that updates the timestamp when the "Refresh" button is used in Power BI Desktop.

If the dataset in the workspace shows the refresh timestamp as the time of the button click, that indicates a successful refresh, right?

No, that's just showing when the refresh attempt started. Says nothing about the duration or the success.

 

Power BI Service will happily refresh stale data over and over. This can tell you that the refresh mechanics work, but will not be useful for your report users.

 

The dataset doesn't contain any such dates.

Look again, or maybe add your own column based on upstream processing  (file last modified date time, for example)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.