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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Time Zone issue after publishing report

Hi All,

 

 

For Shift, I have created a calculated column as below

 

Shift = 
    IF( HOUR ( NOW()  ) >= 6 && HOUR( NOW() ) < 18, Table[isDayshift], 
               IF(Table[isDayshift] = 1, 0, 1) 
       )

My Time Zone is +8 UTC, so when I publish my report, the power BI server is 8 hours behind and hence my logic fails.

If I update my DAX code as below:

Shift = 
    IF( HOUR ( NOW() + (8/24)  ) >= 6 && HOUR( NOW() ) < 18, Table[isDayshift], 
               IF(Table[isDayshift] = 1, 0, 1) 
       )

Then it gives incorrect results in Power BI desktop but correct in Power BI server.

Is there a way that will take local time both in Desktop and Server?

 

Thanks,

Chinmay 

2 ACCEPTED SOLUTIONS
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

In Power BI Service, the now() function will return the UTC time. We can't set the time zone on Power BI Service. To get the correct local time. We can switch time zone when add a custom column. I have tested it on my local environment.

Untitled.pngUntitled1.png

Capture.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Hi @Anonymous ,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

In Power BI Service, the now() function will return the UTC time. We can't set the time zone on Power BI Service. To get the correct local time. We can switch time zone when add a custom column. I have tested it on my local environment.

Untitled.pngUntitled1.png

Capture.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Is the setting "Use UTC Time" now correct this issue? I have the same problem and am using the work around. It looks like this might be addressed in the image below. Please advise. Thank you for your time.

fabric.PNG

Hi, I have worked through the solution in this thread and my two UTC date/time fields do get converted properly to my locale (GMT -6, US Central time) in Power BI Desktop.  However, when publishing my report back to the Power BI Service online, my date/time fields seem to be back in UTC format and are not correct.   Is there any additional troubleshooting that can be done on this?
-Source Date/Time field data is in a SharePoint Online list and is correct.
-Power BI Desktop pulls it in as UTC date/times.

-Custom columns created that take the original UTC date/time fields and converts them to my locale using the TimeZone Switch code.  All values are corrected.  I then update my visual to include those two new calculated fields.  

-Publish back to the online service and the values are incorrect again.

Any help on this is appreciated.  *highly odd and frustrating to me*

Thanks, 

Martin

Having the same exact problem here, used a custom column to change to eastern and works on desktop, briefly shows the right time in cloud after publish but on refresh the times go back to UTC...why is this so difficult? 

 

did you ever figure out a solution?

Hi @Anonymous ,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.