Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Applicable88
Impactful Individual
Impactful Individual

Datetimeswitchzone function does not switch time back to "real" local time

Hello,

 

I'm using this function to get the right local time also on the PowerBi Service, and also for switching the daylight saving two times per year:

if [Summertime/Wintertime]="S"
then DateTimeZone.SwitchZone(DateTimeZone.FixedLocalNow(),2,0) else
DateTimeZone.SwitchZone(DateTimeZone.FixedLocalNow(),1,0)

So I made a column for daylight saving. That column is connected with another column to check what day is is today. So now we definitely have summertime, so "S" is activated.

Now according to my function when "S" is valid and I refresh at powerbi service normally I should get my UTC+2 time. Making a quick double check in a card visual I instead still displays only the UTC+0 servertime. Not even the +1 is valid here. 

On PowerBi Desktop I get the right date, and the function should switch to UTC+2 on the server as well when the report gets a refresh.

 

What might be the problem?

Thank you in advance.

Best.

 

 

 

 

2 ACCEPTED SOLUTIONS
v-jingzhang
Community Support
Community Support

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.

View solution in original post

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. 

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

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.

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. 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.