Forum Discussion
Automatically adding date for last refresh of data
- Anonymous9 years ago
Hi Anonymous,
You can directly use the last refresh time in tile of dashboard. Clicking the ... on the top right hand corner of the tile, then select Tile details and select “Display last refresh time” as shown in the following screenshots. The refresh time will now show at the top of the tile.
Another method is to generate Last Refreshed Date with Power Query, then create the Last Refreshed Measure and add it to dashboard. For more details, please review the following blog:
http://www.excelguru.ca/blog/2016/06/08/display-last-refreshed-date-in-power-bi/
Thanks,
Lydia Zhang
Good question, it's possible to add a robust timestap of the refresh in Power BI. But there's a cavait.
Let's focus on the Power Query way. The DateTime.LocalNow() function in Power Query retrieves the current time on the machine that refreshes the Power BI dataset.
That can be your laptop, but when you upload a dataset to the power BI service it can also happen from another country. That’s all depending on the country your tenant is in.
For example, my tenant is in Ireland, even though I work in the Netherlands.
In those cases the last refresh date can be wrong. One suggestion if you’re experiencing that issue is to include a daylight saving time.
You can do that by offsetting the UTC value from DateTimeZone.UTCNow() by the relevant offset values for your country. Also known as summer and wintertime. Or GMT + 1 GMT+ 2, those kind of notations.
Some more details are written here:
https://gorilla.bi/power-query/last-refresh-datetime/
By finding the last sunday in march and last sunday in october, you know when daylight saving switches time.
Hope that helps,
Rick
--------------------------------------------------
@ me in replies or I'll lose your thread
Master Power Query M? -> https://powerquery.how
Read in-depth articles? -> BI Gorilla
Youtube Channel: BI Gorilla
If this post helps, then please consider accepting it as the solution to help other members find it more quickly.