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?
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.
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):
The code file actually contains multiple chunks of M and DAX code that should be copied separately to their target query editor. I kept them in one file to make it easier to get all the pieces at once. Best to open that in Notepad or a text editor, then copy the respective pieces you need.
You can see the comments I included for “End table definition” (that’s the end of the M code script to create the table), and for “Begin function definition…” (that’s the start of the M code for the function that converts the date). The DAX function to display the Last Updated value is below all that.
Just copy the code between each Begin/End set of comments and you’ll be all set!