refresh data
2 TopicsHow to add the Last Date Time refresh with two simple DAX functions
Hi all - I have figured out a way to add the automatic Last Date-Time Refresh to local timezone with two simple and straight-forward DAX functions that I'd like to share with you. If you have tried to set-up the local time on desktop version but the dashboard always reflects the GTW time whenever auto-refresh occured, it's because the Last Date-Time refers to the last refresh of Power BI server based on GTW. You can follow step by step below and it will work flawlessly no matter which local timezone you are. Create a custom column as UTC time.I use a Brand logo table to create a custom column since the data table is very small. If you pull data from direct source, you should create a new table and custom column by New Source/Blank Query. Why UTC? Because there is no time difference between GWT and UTC. However, GWT is a timezone while UTC is a timestandard. Click here for more details. DAX= Table.AddColumn(#"Renamed Columns", "Last Refresh Date Time", each DateTimeZone.FixedUtcNow(), type datetimezone) Add one more custom column by DAX switch zone function: I switch from UTC timezone to my local PST timezone by -7 hours. If your local time is different more than PST, you can adjust -/+ hours based on the difference time between UTC and your local timezone. You also add more other timezone by repeating this step 2. DAX= Table.AddColumn(#"Added Custom", "PST", each DateTimeZone.SwitchZone([Last Refresh Date Time], -7), type datetimezone) Use the PST column for the Last Refresh DateTime. This will work on the app as well.8KViews8likes2Comments