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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
gjadal
Microsoft Employee
Microsoft Employee

Convert UTC to local time zone in DAX

I have a column that contains datetime in UTC.

On my report, I am getting the max of it. I want to convert this UTC date to local time zone in DAX.

Any pointers.?

25 REPLIES 25

As of my analysis your column is in data type: text, change it to data type: date and time.

Two questions:

 

1) This approach does not account for daylight savings time (in the US), does it?

 

2) If #1 above is true, then wouldn't it be easier to simply subtract (8/24) from the date/time column?

Hi Qiuyun,

 

Thanks for this post - could solve a problem I'd like to address.

 

I would like to show the "Last Refreshed DateTime" in my reports. I want this to provide the time in PST.  The report is currently either refreshed via the Desktop (local to PST), or Online.

 

If I use NOW() in my report, I will get different times depending on whether where the refresh takes place.  If via the desktop - NOW() is PST.  If I use the schedule refresh, NOW() comes back in UTC time. M code using DateTime.LocalNow() has the expected same effect.

 

Is there M code to generate UTC time, then I can use your formula above to show the PST refresh time in the report?

 

Thanks!

 

Brian

 

I have the same situation here... How to guarantee that the refresh time is the same among power BI desktop, app.powerbi or published web? Should I use other formula than NOW()?

Hi @Virtual_Ames,

 

Please try to set the locale both in Power BI Desktop and Service. See: Supported languages and countries/regions for Power BI.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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