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.

DAX Formula UTCNOW is not correct on the Power BI Desktop

The DAX formula UTCNOW() is incorrect in the PowerBI Desktop. It is fine in the Web Server.

 

I am in NZ DST timezone which is currently UTC+13. The formula is returning a value for UTC which is one hour ahead than actual UTC. The timezone on my local PC has been set to automatic (NZ) and is adjusted for Daylight Savings.

 

Measures are defined as:

 

UTC Now = UTCNOW() 

Now = NOW()

 

 

Capture.PNG

Status: Needs Info
Comments
v-jiascu-msft
Employee

Hi @Anonymous,

 

To be honest, UTC time couldn't be wrong. Because we only have one UTC time (UTC+0). You can check it out in this site. Please check out your local settings. If you still have such issue, please provide more detailed information.

DAX_Formula_UTCNOW_is_not_correct_on_the_Power_BI_Desktop

 

Best Regards,

Dale

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
Anonymous
Not applicable

Hi 

 

Please see comparison between the formula and website. I have also attached a screenshot of my Windows settings. As you can see it is set to automatic timezone.

 

UTC.PNGSettings.PNG

Anonymous
Not applicable

When I set the timezone manually and change the daylight saving adjustment, the UTC time changes. It looks like the formula may not be adjusting for DST properly? Please see the screenshots below.

 

With manual timezone (UTC+12 Auckland, Wellington) and no daylight saving, UTC is correct.

With manual timezone (UTC+12 Auckland, Wellington) and daylight saving adjusted, UTC is incorrect as it is plus one from UTC.

 

 

Daylight Saving Off, Correct UTCDaylight Saving Off, Correct UTCDaylight Saving On, UTC IncorrectDaylight Saving On, UTC Incorrect

Anonymous
Not applicable

I agree that UTCNOW produces wrong result!

 

At the time of this post, when I visit https://www.timeanddate.com/worldclock/timezone/utc it says: 12:22:00

But when I enter UTCNOW() in a measure it says 13:22:00

seanrichmkv
Frequent Visitor

TLDR: Turn off automatic adjustment for DST on your PC and manually select the correct time zone.

 

Long Version:

I had this same issue happening in one of my reports. It appears to be an issue with the way Power BI interprets time when you are adjusting for DST automatically on your PC.

 

Previously I had my time zone set to Eastern Time (UTC-5), automatically adjusting for DST. The PC time shown was correct, however my Power BI measure showed an hour ahead. I changed my PC time zone to Atlantic (UTC-4) and turned off automatic DST adjustment, and the PC time was correct, and so was my Power BI measure's calculation. These findings carry over to calculating for current time zone as well.

 

PS. PBI measure

PBI UTC.PNG

PS. UTC time

Google UTC.PNG

 

 

luis_arauco
Regular Visitor

I Found a solution to a similar problem, the time shows different, because when you publish the time is on the PBI server time, to fix this reduce or increase the time in days deppending your zone:

 

In my case in Peru es UTC(-5), so my field is: NOW()-0.208333

The number -0.20833 is the five hours divide on 24 

 

I hope it help you.