Refresh Date not working when Published

Hi I have a Latest refresh Date table (M code below)

This updates fine in Power BI Desktop, but when it is published it does not update when a scheduled refresh runs from the Workspace, despite all other data updating.

At first I thought it was because I used it in the Text field as a value, but even if I replace it with a Table field, it does not work. Has anyone else encountered this and do you have a solution?

M Code:

Source = DateTime.LocalNow(),
#“Converted to Table” = #table(1, {{Source}}),
#“Renamed Columns” = Table.RenameColumns(#“Converted to Table”,{{“Column1”, “DateTime”}}),
#“Duplicated Column” = Table.DuplicateColumn(#“Renamed Columns”, “DateTime”, “DateTime - Copy”),
#“Changed Type” = Table.TransformColumnTypes(#“Duplicated Column”,{{“DateTime - Copy”, type date}}),
#“Duplicated Column1” = Table.DuplicateColumn(#“Changed Type”, “DateTime”, “DateTime - Copy.1”),
#“Changed Type1” = Table.TransformColumnTypes(#“Duplicated Column1”,{{“DateTime - Copy.1”, type time}}),
#“Renamed Columns1” = Table.RenameColumns(#“Changed Type1”,{{“DateTime - Copy”, “Date”}, {“DateTime - Copy.1”, “Time”}})
#“Renamed Columns1”

I believe there are several postings concerning this issue on the forum. right now i don’t have time to search the forum…Please search the forum

Power Query also has Refresh Enabled on the table just as an update.

@ Keith from Finance - I didn’t find anything on the forum about this specific issue other than adding the latest refresh date and I checked more than one place before I came here for a solution, but thanks for your feedback.

Check youtube and the courses on edna. there might be something there

It wasn’t Power BI failing to refresh, it was the Browser.

Pressing CTRL + F5 to bypass the cache fixed my issue. The date updated in the report.

Hi @lavina.bogan ,

I have attached a text file containing the various bits of M code and DAX to create a Last Updated value for Power BI service reports, including handling DST for many time zones. The value will be updated each time the dataset is refreshed.

Once the pieces are set up, you just add a text box visual to display the DAX “LastUpdated” value. Note that the time value is when the refresh completed.

The text box value displaying the DAX function result appears like this in my report (I’m in the US, EST):

LastRefreshDateTime.pq (3.0 KB)