cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
cristianml Member
Member

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

Accepted Solutions
cristianml Member
Member

Re: Last time Refreshed

ntaylo06 Regular Visitor
Regular Visitor

Re: Last time Refreshed

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

Untitled1.pngIn PBI DesktopCapture.PNGIn 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

6 REPLIES 6
domingom Frequent Visitor
Frequent Visitor

Re: Last time Refreshed

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 Member
Member

Re: Last time Refreshed

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.

Community Support Team
Community Support Team

Re: Last time Refreshed

@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

cristianml Member
Member

Re: Last time Refreshed

domingom Frequent Visitor
Frequent Visitor

Re: Last time Refreshed

Awesome. Thank you for sharing.

ntaylo06 Regular Visitor
Regular Visitor

Re: Last time Refreshed

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

Untitled1.pngIn PBI DesktopCapture.PNGIn 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

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 124 members 1,414 guests
Please welcome our newest community members: