cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nirrobi
Helper V
Helper V

last time refresh

Hi,

 

Is it possible to add to the report/dashboard the date and time of the last refresh?

 

Many thanks.

 

Nir

2 ACCEPTED SOLUTIONS

Hi,

 

Maybe this will solution will help,

 

http://www.powerpivotpro.com/2010/11/add-a-last-refreshed-date-readout/

 

I will try tommorow and update 🙂

View solution in original post

Hi nir,

 

You can add a calculated column (Last Refresh Column) in the model with the formula =NOW()

And measure Last Refresh Date :=MAX(Table[Last Refresh Column])

 

Since calculated columns are calculated only on model refresh - it will make sure the calc is right

 

 

View solution in original post

60 REPLIES 60
walton9
Regular Visitor

And if there is no edit pencil? and no Tile Details? And no "last date refreshed"?

This worked for me and takes into account that when the auto refesh on PowerBI.com occurs it is done in GMT time:

 

Enter this M formula into a blank query in the get data button:

 

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),-10))

 

The -10 is becasue I am +10 GMT. Not sure why it needs to be negative but it is.

 

Hope this works.

 

Giles

is there any way to kno wwhether the refresh is happening of the server of Locally? so that we can code this consistently?


@GilesWalker wrote:

This worked for me and takes into account that when the auto refesh on PowerBI.com occurs it is done in GMT time:

 

Enter this M formula into a blank query in the get data button:

 

= DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),-10))

 

The -10 is becasue I am +10 GMT. Not sure why it needs to be negative but it is.

 

Hope this works.

 

Giles



Giles, 

 

Your formula was very helpful to me. However, instead of adjusting between two local timezones, I used UtcNow. 

 

= DateTimeZone.SwitchZone(DateTimeZone.UtcNow(),-5)

Actually, that solution doesn't account for daylight savings time. Reza Rad has a comprehensive post on the problems here:

http://radacad.com/solving-dax-time-zone-issue-in-power-bi

 

Solution 3 presents two ways to get the current time from a website. The first of these ways works for me, but I'm going to try the XML version also.

I believe this is the right solution to the time issue - but it is not clear how to enter the M code.  Blank query does not indicate a clear path to entry.....

 

Could you perhaps clarify your answer a bit? I'd like to implement this and test....

 

Thanks,

 

Brian

crazytown
New Member

This was showing the last time I ran my report but now seems to have disappeared again ... anyone know why please?

Greg_Deckler
Super User IV
Super User IV

No way that I know of. This would be SUPER helpful. When you share out a dashboard, not everyone will be able to see when it was last refreshed without this. And this will be the first things people ask or want to know about..."How recent is this?"


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi,

 

Maybe this will solution will help,

 

http://www.powerpivotpro.com/2010/11/add-a-last-refreshed-date-readout/

 

I will try tommorow and update 🙂

View solution in original post

Hi nir,

 

You can add a calculated column (Last Refresh Column) in the model with the formula =NOW()

And measure Last Refresh Date :=MAX(Table[Last Refresh Column])

 

Since calculated columns are calculated only on model refresh - it will make sure the calc is right

 

 

View solution in original post

When you need Last Refreshed at on the report page - You may not need to create a new calculated column. You can create a measure "LAST REFRESHED = NOW()"

You can use a card visual and put this measure in fields.

This should work.

Last updated.png

 

 

@ShrikantKhanna, that's a good suggestion.

 

I'll have to test it out.

 

On first view it works well in Power BI Desktop

 

When I publish the file to Power BI .com  I get a different result, the one on the right is correct, the =NOW() one on the left has changed...

 

Refresh.PNG

Hi @wynhopkins

 

This may be due to refreshing of report that happens when you open power bi.com. Reports dont have an option to show last refresh time as the way it is possible on any tile on dashboard. It can be helpful if we can also have this on reports as well.

I prevent myself from refreshing powerbi.com or logging back in so that it remains the same and does not differ, Instead, I remain logged in and use different report for other work. The moment it refreshes it takes the most recent timestamp, however, the dataset was refreshed at a different time or at scheduled timestamp.

I think I'll stick with my calculated column technique,  it's been reliable for the last year

 

https://community.powerbi.com/t5/Desktop/Set-up-a-tile-with-last-refresh-date-and-time/m-p/33668#M11...

 

 

All good ideas.

 

I have ended up having a table generated in Power Query called "Last Data Refresh" which is

 

DateTimeZone.LocalNow()

 

This seems to give the local time for me of the last time the data was refreshed. One of my refreshes takes quite a while so it may not be the time the data ws actually pulled from the source system but the time the computations get around to updating thsi value as part of the overall set of queries.

pmendoza
Frequent Visitor

This is not possible in either my Desktop or Service . Am I missing something?

Thanks!

AStolk
Regular Visitor

Within Power BI Desktop, this works fine! However, after publishing this to PowerBI.com and executing a refresh within the browser, the result of the Last Refresh Date is always displaying an hour too early. It looks like it's refreshing and displaying the last refresh date and time in GMT timezone, but I'm in GMT+1. Is it possible to take into account the timezone?

Business Consultant PPM @ QS solutions
MCTS & MCP

@nirrobi Is this for troubleshooting purposes? Just to point out, you can see when the dataset that supports the reports/dashboards was last refreshed. Just click the elipses of the dataset that currently has a scheduled refresh set and it will show you when the last refresh was, and when the next one is scheduled.

You could then assume that all reports / dashboard tiles should be updated based on that date/time.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Thanks for the reply.

 

Its not for troubleshooting but to know we the last refresh was.

Meantime I have problem with the schedule refresh and want to know the last time the dataset was refresh, is it possible?

I want to have tile with last time the dataset was refresh.

 

Regards,

 

Nir,

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors