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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to change column datetimezone to a localtime column?

screenshot.jpg

Hi community,

I have an issue on converting a column in datetimezone format to a localtime column on a report in a directquery mode in PBI Desktop with the 'DateTimeZone.ToLocal' formula, when i try to do this a message appears and I  have to delete the localtime column. Any idea?

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @Anonymous,

 

As indicated in the message, 'DateTimeZone.ToLocal' function is not supported in DirectQuery mode currently.

 

In this scenario, I would suggest you to change the date time on the source side if possible, or you can use DAX to create a calculate column to manually change the date time to local. The formula below is for your reference.Smiley Happy

Column = Table1[LocalTime] - TIME ( 6, 0, 0 ) --the UTC

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @Anonymous,

 

As indicated in the message, 'DateTimeZone.ToLocal' function is not supported in DirectQuery mode currently.

 

In this scenario, I would suggest you to change the date time on the source side if possible, or you can use DAX to create a calculate column to manually change the date time to local. The formula below is for your reference.Smiley Happy

Column = Table1[LocalTime] - TIME ( 6, 0, 0 ) --the UTC

Regards

Anonymous
Not applicable

Thank you for your comment, I´m going to use it. I think I have to do a work around because the report its going to be used in several countries with diferents UTCs. Now, I have another question, how can I get the local UTC in order to do the conversion time?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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