Forum Discussion
Refresh time on visual
- Anonymous5 years ago
Hi adnankabina ,
In your scenario, you should use Calculated Column or M Query instead of Measure.
The former will refresh time after the dataset was refreshed, the latter will refresh time after the page was refreshed.
For calculated column, right click on the table and create a new column using your formula.
For M Query, open query editor and add custom column with below formula.
DateTime.LocalNow() + #duration(0,4,0,0)Best Regards,
Jay
Hi adnankabina
I believe you're on the right track, but would you mind creating the same in Query Editor.
Please use Blank query and write = DateTime.LocalNow().
Please refer to the below link for reference. it works fine for me and time only changes when I refresh the model or it's on schedule refresh.
https://www.youtube.com/watch?v=oN6mOmEruOQ
Hope it helps.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904
- adnankabina5 years agoHelper II
Thanks for help. After publishing it is showing me UTC time , how can i subtract 4 hours? any idea
- AnkitKukreja5 years agoSuper User
Hi adnankabina
Yes, please use DateTime.From ( [DateTime] ) + #duration(0, +5,0,0)
Note : +5 is utc to my time zone (so change as per your need). And [DateTime] is my date time column already availbale.Thanks,
Ankit
- adnankabina5 years agoHelper II
Hi AnkitKukreja,
Should I do in blank query or create a measure. I didnt get you.
This is what I did in blank query but go error.
= DateTime.From ( [DateTime] ) + #duration(0, +5,0,0)
Expression.Error: There is an unknown identifier. Did you use the [field] shorthand for a _[field] outside of an 'each' expression?