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

Direct Query date conversion from UTC to Local Timezone

Hi there,

 

I was planning to build a live dashboard that has all the data stored in Azure SQL DB, I was planning to use direct query instead of import so that I would avoid schedule refreshes and avoid load on the database services. Direct Query works fine till I want to modify the UTC to local time. I cannot add a column and use "DateTimeZone.SwitchZone" for converting my dates from UTC to local. 

 

Is there any workaround for conversions?  If not should I go back to Import Query mode and perform schedule refreshes? 

1 ACCEPTED SOLUTION

@Anonymous , when you create a connection there is the connection to give a query. You can use that.

 

simple addition and subtraction can work in dax and power query. If your timezone do not change with the season then you can simply try to add and subtract time and check

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous ,the best way is to use a SQL in advance option and do the conversion in SQL. 

Anonymous
Not applicable

Is there a way to do it in Power BI? The reason is I am not the owner of the SQL DB and any changes to it might be a long process of approvals and documentation.

@Anonymous , when you create a connection there is the connection to give a query. You can use that.

 

simple addition and subtraction can work in dax and power query. If your timezone do not change with the season then you can simply try to add and subtract time and check

Anonymous
Not applicable

Yeah, that worked brilliantly, thanks for the quick response 🙂

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.

Top Solution Authors