Time of the last refresh

Two techniques for obtaining the PBI dataset’s last refresh time

Importance of the last refresh time

It is a good practice to include in your Power BI reports when was the last time the dataset got refreshed. There are several techniques for doing so.

World Time API

This is my favorite way of getting the last refresh time, because you do not have to deal with time zones adjustments. Only need to replace “Europe” for the continent we are interested in, and “Zurich” for the city.

Source = Json.Document(
RelativePath =
datetime = Source[datetime],
#"Converted to Table" = #table({"Last Refreshed Time"}, {{datetime}}),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Last Refreshed Time", type datetimezone}})
#"Changed Type"

M Query

With a single line of code, we can get the latest UTC time.

Source = #table({"Last Refresh"}, {{DateTimeZone.UtcNow()}})

Consultant, Business Intelligence, data, and analytics.