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
masplin
Impactful Individual
Impactful Individual

Issues with UTC, DST, BST when publishing to the service

I recently had a strange issue where I was converting a BST datetime to a date using transform to date and in Desktop it looked fine, but when publsihed out to theservice the day was a day earlier for any datetime added as 1/9/21 00:00:00 BST. This was becasue this is 31/8/21 23:00:00 UTC and the service can't handle this. Even converting the datetime using "Use Locale" in Desktop didnt solve this.

 

I spoke at length to Power BI support and unbeleivably this is a major bug thgat the service cannot handle any time other than UTC.  i am sure there are thousands of people out there iwth the same issue. Many people may not realsie the data on the service is wrong as their desktop model looks correct.  I am stunned Microsoft prioritise fancy new visuals over havcing correct data!!

 

The solution I have been given is extremly horrible, especially if you have multiple datetime columns, but I'm postting it here for general information

 

1) This scenario we tried on the call and as there is currently no way to change the time zone in Service. You can try changing the time to the locale in Power BI desktop as below and give a try. (This made no differnece for me)

2) Assuming currently we have the ‘Time’ and ‘UTC’ column in a table, where [Time] stores the actual UTC time, [UTC] stores the changed hour count between the User and UTC.  Based on the different Time Zone, UTC values change within -12 to 12 range.

 

When data loaded into Power BI, open Query Editor, under the Add column tab, click Add Custom Column, then under the formula part, copy and paste the following: DateTime.AddZone([Time],0)

 

Click OK. This step adds the default UTC Time Zone (0 here) under the time stored in [Time], to the newly created ‘ZoneTime’ column.  After that, we need to create another column to switch the time zone to the client, also click on the Add custom column, then copy and paste the following formula: DateTimeZone.SwitchZone([ZoneTime],[UTC])

 

After that, we have successfully added the time Zone information into the time. Then we need format the column into ‘date/time/timezone’ format.

Select ClientTime column, navigate to Transform tab, choose data type and select Date/Time/TimeZone:

 

After that, click close and apply.

Till then we should have finished converting the time into Client local time.

3) This formula can also be used to change time (here we have taken Australia time) : Change time = UTCNOW() + (11/24) & "AUS"

4) let

     Source = Web.Page(Web.Contents("Replace this with your local time website.")),

     Data1 = Source{1}[Data],

     #"Changed Type" = Table.TransformColumnTypes(Data1,{{"Column1", type text}, {"Column2", type text}}),

     date = #"Changed Type"{1}[Column2], time=#"Changed Type"{0}[Column2],

     datetime=DateTime.FromText(date&" "&time)

in

     datetime


5) change = DateTimeZone.SwitchZone(DateTimeZone.LocalNow(),11,0) to = DateTimeZone.SwitchZone(DateTimeZone.LocalNow(),Parameter,0)

 

The following limitations and considerations currently apply to the relative date range slicer and filter [Applicable if you are using them]:

  1. Data models in Power BI do not include time zone information. The models can store times, but there's no indication of the time zone they're in.
  2. The slicer and filter are always based on the time in UTC, so if you configure a filter in a report and send it to a colleague in a different time zone, you'll both see the same data. However, if you aren't in the UTC time zone, you might see data for a different time offset than you expect.
  3. Data captured in a local time zone can be converted to UTC using the Query Editor.
4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @masplin ,

 

Sorry for bothering, this seems to be a design problem existing in power bi now, you can check this similar idea description and vote:

https://ideas.powerbi.com/ideas/idea/?ideaid=6636c895-418e-4477-9e68-f216c3162015&page=1

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I just voted on this.

I am currently working with a report that has a complex data structure, consisting of over 50 date&time columns coming from Dataverse.

 

Called a meeting with Microsoft Support in the US and was advised there is no way to address this in service without creating new date&time columns and applying the correct time zone. An absolute appalling outcome for what should be a very basic function. If my data is stored as AEST for example, it should be displayed in Service as AEST.

 

To go now and duplicate 50+ columns just to show the correct time zone is not feasible, particularly due to all the custom calculations etc that are built against the original/existing columns. This is truly becoming a decision on whether or not this platform is reliable to continue with or return back to Tableau.

v-yangliu-msft
Community Support
Community Support

Hi  @masplin ,

You can try to add a + time() function after your time measure to display the time in your local time zone to the power bi service.

For example:

The time zone in Power BI Service is based on UTC. My time zone is 8 hours apart from UTC.

I used now(), my local time displayed is: 2021.9.14 4:31:09 PM.

Using the function now()+TIME(8,0,0), in Power BI Desktop, 8 hours will be added from the time in our local time zone.

In Power BI Desktop will become.

vyangliumsft_0-1631522543581.png

Publishing to Power BI Service will change the UTC time  to my local time zone with minus 8 hours :

vyangliumsft_1-1631522543584.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi. Sure lots of ways to manaully change the date, but if you have 20 datetime columns its completely ridiculous to have to create 20 calculated columns to handle what is pretty fundamental. I'm just stunned this hasn't been fixed.   Also DST is a real pain as you havew to only apply the change on certian dates. 

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.