cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cristianml
Responsive Resident
Responsive Resident

Last time Refreshed

Hi,

 

I need a DAX formula or measure to share last time I refreshed the information inside my model or in a tab in APPs.

 

Any suggestions ?refresh.jpg

Thanks, 

 

2 ACCEPTED SOLUTIONS

Here is what I use for my dashboards. The date does not work in PBI desktop, but shows up in app.powerbi.com

In PBI DesktopIn PBI DesktopIn app.,powerbi.comIn app.,powerbi.com

 

Minutes Since Last Refresh = 
VAR hours = DATEDIFF(MAX('Date Tracker'[Last Refresh]), UTCNOW(), HOUR) - 1
VAR minutes = DATEDIFF(MAX('Date Tracker'[Last Refresh]), UTCNOW(), MINUTE) - IF(hours > 0, hours * 60, 0)
RETURN "Time since last refresh: " & IF(hours <= 0, "", hours & IF(hours = 1, " hour ", " hours ") & "& ") & minutes & IF(minutes = 1, " minute", " minutes")

Let me know if you have questions

View solution in original post

6 REPLIES 6
v-yuta-msft
Community Support
Community Support

@cristianml ,

 

I'm afraid currently there's no dax formula which can catch last refresh date in power bi service. You can only configure schedule refresh interval in power bi service.

 

Regards,

Jimmy Tao

Awesome. Thank you for sharing.

Here is what I use for my dashboards. The date does not work in PBI desktop, but shows up in app.powerbi.com

In PBI DesktopIn PBI DesktopIn app.,powerbi.comIn app.,powerbi.com

 

Minutes Since Last Refresh = 
VAR hours = DATEDIFF(MAX('Date Tracker'[Last Refresh]), UTCNOW(), HOUR) - 1
VAR minutes = DATEDIFF(MAX('Date Tracker'[Last Refresh]), UTCNOW(), MINUTE) - IF(hours > 0, hours * 60, 0)
RETURN "Time since last refresh: " & IF(hours <= 0, "", hours & IF(hours = 1, " hour ", " hours ") & "& ") & minutes & IF(minutes = 1, " minute", " minutes")

Let me know if you have questions

domingom
Frequent Visitor

Hi @cristianml . I do not know of any DAX formula or measure that allows you to display when a dataset in the PowerBI Service has last been refreshed. I know that it is possible to retrieve dataset refresh history using a Power BI REST web api call. Hope this helps.

 

https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getrefreshhistory

 

cristianml
Responsive Resident
Responsive Resident

hi @domingom ,

 

Thanks but I need a DAX formula to use it with a visual in the model so END USERS can see last time updated.

 

Regards.

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors