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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
AndySmith
Helper III
Helper III

Today() Function - UTC Offset

Hi 

Apologies in advance - as I have seen several posts on this already - but I am just struggling to make sense of any of it!

I have a measure which uses the 'today()' function to work out the previous day sales (with some added logic to show Fridays sales if it is the weekend or monday).

When I publish the report will not refresh until 11am (Melbourne Australia time) becuase of the time difference between the Power BI service UTC and my local time.

Can some please explain how I can account for this time difference. As far as I understand it is something to do with a time 'offset' function but this is where I am struggling to understand. 

 

I am using one fact table with sales data and a date table. 

 

AndySmith_0-1673909787285.png

 

Thanks

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @AndySmith ,

Please try to use NOW().

Column = NOW()+TIME(10,0,0)

The column=today()+time(10,0,0) represents 2023/1/19 10:00:00.

vpollymsft_0-1674092634892.png

 

Best Regards
Community Support Team _ Polly

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

5 REPLIES 5
Anonymous
Not applicable

Hi @AndySmith ,

"the time difference between the Power BI service UTC and my local time".

Below are 3 possible methods to get around this issue

  • One method to get the correct DateTime is by connecting to a web service to return the local time of whatever region you need. 
  • Probably the easiest method to use is by simply adding or subtracting the difference of your time zone and UTC time from the DAX NOW() function.

  • Power Query has inbuilt functions to deal with this issue, namely the DateTimeZone functions. 

More details: Power BI Date and Time in Desktop vs Service – Bond Consulting Services

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks

I have tried to go with option 2! I have added 10hrs to the 'TODAY()' function.

Sadly this seems to return zero! Any ideas why this may be the case? 

 

AndySmith_0-1674091669258.png

 

I tried this and I found that the reason it returned 0 rows was because the field _Today is now set to the date + time so instead of being 11/04/2024 it's 11/04/2024 10:00:00.

So instead of just looking for records on 11/04/2024, it's looking for records where today's date = "11/04/2024 10:00:00".  If there are no records that fulfill this time criteria it will return 0.

I'm now looking into the Time Zone solutions.

Anonymous
Not applicable

Hi @AndySmith ,

Please try to use NOW().

Column = NOW()+TIME(10,0,0)

The column=today()+time(10,0,0) represents 2023/1/19 10:00:00.

vpollymsft_0-1674092634892.png

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

bolfri
Solution Sage
Solution Sage

I am sorry, but I don't know the answer directly, but maybe this one might help:

https://support.helpshift.com/kb/article/how-do-i-set-my-timezone-in-power-bi/https://www.thepowerus...


Maybe creating a dummy_table with "today" column in Power Query M that respect your timezone and use in the dax would help?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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