Forum Discussion
roopa_123
4 years agoHelper I
Last Refresh Date
Hello PowerBI Community,
I need to show the 'Last Refreshed Date' on my powerbi report in a TextBox. How do I create it using only DAX. Although I am aware of creating it using PowerQuery, but I am not allowed to touch the data model.
Help is appreciated!
3 Replies
- truptisCommunity Champion
- AnonymousNot applicable
Hi roopa_123 ,
Please refer to the following topic to see if it helps you.
How to add the Last Date Time refresh with two simple DAX functions
- Create a custom column as UTC time.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.
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.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.