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

Convert UTC to UTC Brazil (-03:00:00)

Hi, the logoff column is in datetime format, with the data being extracted from the stoptime column. Unfortunately the column is in the UTC time zone. How do I convert to UTC Brazil (-3 hours)? I need to creat a new column or edit the logoff column

 

duvida.jpg

1 ACCEPTED SOLUTION
blopez11
Resident Rockstar
Resident Rockstar

Add a step to convert logoff to datetime format, then add a variation of the following:
#"Added logoff (UTC)" = Table.AddColumn(#"*** your prior step here ***", "logoff (UTC)", each DateTime.AddZone ( [logoff], 0 ), type datetimezone ),
#"Added logoff (Brazil)" = Table.AddColumn(#"Added logoff (UTC)", "logoff (Brazil)", each DateTimeZone.RemoveZone ( DateTimeZone.SwitchZone ( [#"logoff (UTC)"], -3 ) ), type datetime),

 

Hope this works for you,

View solution in original post

4 REPLIES 4
dvnnnaidu
Helper II
Helper II

@admfabiomachado , you can add coumn using DAX in Data or Report as below

 

New Column = 

([logoff)-TIME(3,0,0)
clubspec
Helper III
Helper III

If the UTC time is 3 hours different in your case try just edit the fomula with - ((1/24)*3)

blopez11
Resident Rockstar
Resident Rockstar

Add a step to convert logoff to datetime format, then add a variation of the following:
#"Added logoff (UTC)" = Table.AddColumn(#"*** your prior step here ***", "logoff (UTC)", each DateTime.AddZone ( [logoff], 0 ), type datetimezone ),
#"Added logoff (Brazil)" = Table.AddColumn(#"Added logoff (UTC)", "logoff (Brazil)", each DateTimeZone.RemoveZone ( DateTimeZone.SwitchZone ( [#"logoff (UTC)"], -3 ) ), type datetime),

 

Hope this works for you,

camargos88
Community Champion
Community Champion

Hi @admfabiomachado ,

 

Check this function:

https://docs.microsoft.com/pt-br/powerquery-m/datetimezone-switchzone



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



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.