Forum Discussion

maryanncardenas's avatar
maryanncardenas
Regular Visitor
1 year ago
Solved

Change Date/Time Zone

I would like to ask for your help as I wanted to use different timezone for example use Dublin Time whenever my report refreshes. I tried using the measure "UTCNOW() + TIME(1,00,0)" - it does get the Dublin Time but it reflects the time "now" rather than me wanting onlt the timestamp for the scheduled refresh of the report,

 

Many Thanks

  • hey maryanncardenas,

    To get report refresh time in Dublin time:

    1. Go to Power Query β†’ New Blank Query
    2. Paste this code:
      • let

        utcNow = DateTimeZone.UtcNow(),

        dublinTime = DateTimeZone.SwitchZone(utcNow, 1) // Use 0 or 1 depending on DST

        in

        dublinTime
    3. Name it RefreshTimeDublin and load it to your model.

    *Note:

    • UTCNOW() in DAX shows current time, not refresh time.
    • Only Power Query captures the actual refresh timestamp.

    ⭐Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
    πŸ’‘Found it helpful? Show some love with kudos πŸ‘ as your support keeps our community thriving!
    πŸš€Let’s keep building smarter, data-driven solutions together! πŸš€ [Explore More]

3 Replies

  • hey maryanncardenas,

    To get report refresh time in Dublin time:

    1. Go to Power Query β†’ New Blank Query
    2. Paste this code:
      • let

        utcNow = DateTimeZone.UtcNow(),

        dublinTime = DateTimeZone.SwitchZone(utcNow, 1) // Use 0 or 1 depending on DST

        in

        dublinTime
    3. Name it RefreshTimeDublin and load it to your model.

    *Note:

    • UTCNOW() in DAX shows current time, not refresh time.
    • Only Power Query captures the actual refresh timestamp.

    ⭐Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
    πŸ’‘Found it helpful? Show some love with kudos πŸ‘ as your support keeps our community thriving!
    πŸš€Let’s keep building smarter, data-driven solutions together! πŸš€ [Explore More]

  • Volatile functions like TODAY() and NOW() are recalculated every time a user interacts with the report, as measures are computed on the fly. To avoid this, it's better to use a static table instead either in DAX or M. Create a calculated table using the DAX formula below.

    UTC_now =
    { UTCNOW () + TIME ( 1, 00, 0 ) }
    

     

     

  • v-sdhruv's avatar
    v-sdhruv
    Community Support

    Hi maryanncardenas ,

    May I ask if you have resolved this issue? Were you able to convert your time to Dublin timezone?
    You can follow the solution provided by danextian  and GrowthNatives  and these would help you to achieve your result.
    If you are still not able to get the result, please consider sharing the error message or a sample data.
    If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
    Thank You!