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.
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
Solved! Go to Solution.
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.
Regards,
Frank
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
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.
Regards,
Frank
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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |