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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

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

Anonymous
Not applicable

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
Super User

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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

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 🙂

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

 

 

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

 

 

Anonymous
Not applicable

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.

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

Thanks!

AStolk
Frequent 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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors