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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
STS_Joshua
Helper II
Helper II

UTC time zone work around help

Hi all,

I have a report that uses the TODAY() function to calculate a few things such as sales made today:

today = CALCULATE(SUMX('Open','Open'[Quantity]*'Open'[Price]*'Open'[DocRate]),'Open'[DocDate]=today())

The problem is that the BI service uses UTC time and we are located in MST so this measure will return $0 at 6pm (UTC -6). I am pulling the data from our SQL server which is located locally and the report needs to remain a direct query report. The current time doesn't really matter to us, just the date so I thought of replacing TODAY() like this:

today = CALCULATE(SUMX('Open','Open'[Quantity]*'Open'[Price]*'Open'[DocRate]),'Open'[DocDate]=LASTDATE('Open'[DocDate]))

This is not allowed by the DAX police apparently...

 

Is there something else that I can do to work around this issue?

1 ACCEPTED SOLUTION

Hi @STS_Joshua 

Please check if below formula could help.

today =
SUMX (
    FILTER ( 'Open', 'Open'[DocDate] = LASTDATE ( 'Open'[DocDate] ) ),
    'Open'[Quantity] * 'Open'[Price] * 'Open'[DocRate]
)

Regards,

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

View solution in original post

4 REPLIES 4
STS_Joshua
Helper II
Helper II

I'm going to try replacing TODAY() with NOW()-(6/24) which should hopefully subtract 6 hours from UTC and make the times match at least online. On desktop the report will think it's 6 hours prior but I don't think I'll have many reasons to run this report at 5am... 

 

I do hope doing it this way won't just attempt to subtract 6 hours from UTC at midnight in this sort of fashion:

 

NOW(): 5/24/2019 00:00 = NOW()-(6/24): 5/24/2019 00:00

NOW(): 5/24/2019 01:00 = NOW()-(6/24): 5/24/2019 00:00

NOW(): 5/24/2019 02:00 = NOW()-(6/24): 5/24/2019 00:00

...

NOW(): 5/24/2019 07:00 = NOW()-(6/24): 5/24/2019 01:00

Hi @STS_Joshua 

There're two workarounds for you.One in dax and the other in query editor.Please check if below posts could help.

https://community.powerbi.com/t5/Desktop/DateTimeZone-UtcNow-not-working-properly-in-Power-BI-Servic...

https://radacad.com/solving-dax-time-zone-issue-in-power-bi

For 3rd party Links:

Please understand that this link is provided “AS IS” with no warranties or guarantees of content changes, and confers no rights.

Regards,

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

As I mentioned above, I changed all the TODAY() to NOW()-(6/24) and that is displays the time in the right time zone. The strange thing is that when I went to access the report sales for the day went to (Blank) after 1800MST (UTC-6) while the time still showed as correct for the time zone.

Hi @STS_Joshua 

Please check if below formula could help.

today =
SUMX (
    FILTER ( 'Open', 'Open'[DocDate] = LASTDATE ( 'Open'[DocDate] ) ),
    'Open'[Quantity] * 'Open'[Price] * 'Open'[DocRate]
)

Regards,

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.