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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cristianml
Post Prodigy
Post Prodigy

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

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors