Forum Discussion

AndySmith's avatar
AndySmith
Helper III
3 years ago
Solved

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. 

 

 

Thanks

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    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.

     

    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.

     

5 Replies

  • Anonymous's avatar
    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.

    • AndySmith's avatar
      AndySmith
      Helper III

      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? 

       

       

      • Anonymous's avatar
        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.

         

        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.