Forum Discussion
Datetimeswitchzone function does not switch time back to "real" local time
- 5 years ago
Hi Applicable88
Since you are using the M functions in Power Query to get the local time, the time data on Power BI Service is refreshed only when the dataset is refreshed at the service not when the report is refreshed. You could refresh the dataset first, then refresh the report page to see the time update.
If you always want to show the local time on the report page regardless of whether the dataset is refreshed, you could use DAX method to get the local time.
Local time DAX = UTCNOW() + 2/24
In your scenario, tryLocal time = IF('Table'[SW]="S",UTCNOW()+2/24,UTCNOW()+1/24)
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it. - 5 years ago
Hi v-jingzhang, thank you for the effort. Thats a good workaround. I also found another problem why the "information" on the utc+X time wasn't transferred into the datamodel. I had to change the datatype to the Datetimezone (which is the globe symbol) , instead I was still at Datetime only. Eventhough I see the right time it disregard the UTC+X value.
Thx.
Best.
Hi Applicable88
Since you are using the M functions in Power Query to get the local time, the time data on Power BI Service is refreshed only when the dataset is refreshed at the service not when the report is refreshed. You could refresh the dataset first, then refresh the report page to see the time update.
If you always want to show the local time on the report page regardless of whether the dataset is refreshed, you could use DAX method to get the local time.
Local time DAX = UTCNOW() + 2/24
In your scenario, try
Local time = IF('Table'[SW]="S",UTCNOW()+2/24,UTCNOW()+1/24)
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
- Applicable885 years ago
Impactful Individual
Hi v-jingzhang, thank you for the effort. Thats a good workaround. I also found another problem why the "information" on the utc+X time wasn't transferred into the datamodel. I had to change the datatype to the Datetimezone (which is the globe symbol) , instead I was still at Datetime only. Eventhough I see the right time it disregard the UTC+X value.
Thx.
Best.