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.

Reply
Robert14358
Resolver III
Resolver III

need to get report refresh time in report for DST

Hello All.

 

I know you can use datetime.local in power query to generate the date and it converts it to UTC in the power BI service.

 

my questions is though, does this incorporate day light savings time as well?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

yes, daylight saving (not savings) time is factored in. You can use the timezone functions in Power Query to translate back and forth as needed. But as you stated behind the scenes everything is done in UTC (as it should be).

View solution in original post

4 REPLIES 4
v-nuoc-msft
Community Support
Community Support

Hi @Robert14358

 

@lbendlin Good Share!

 

To your question, when you use in Power Query, it retrieves the local date and time of the machine on which the query is being executed. However, when the query is refreshed within Power BI Service, the server's time settings are used, which may or may not automatically account for daylight savings time adjustments depending on the configuration.

 

Here are the steps you can take to ensure that DST is taken into account in your reports:

  1. Check Regional Settings:

    • In Power BI Service, go to the dataset settings and verify the regional settings to ensure they are set to a location that observes DST.
    • This setting can affect how the time is displayed in your reports.
  2. Use TimeZone Functions:

    • Instead of using , consider using functions that explicitly handle time zones, such as .datetime.localDateTimeZone.ToLocal
    • This allows you to manage the conversion to local time with daylight savings taken into account.
  3. Manual Offset Adjustment:

    • In Power Query, you can manually adjust the time to account for DST if necessary.
    • Add or subtract the appropriate number of hours to the value based on whether DST is in effect.datetime
  4. Verify Refresh Schedules:

    • If you have scheduled refreshes set up, be aware that the Power BI Service uses UTC time for scheduling.
    • Adjust your scheduled refresh times if needed to account for changes due to DST.
  5. Automate DST Adjustments:

    • You can write M code in Power Query to determine if the current date falls within the range of DST for your local time zone and adjust accordingly.
  6. Testing:

    • Finally, test your reports after making changes to ensure that the date and time are being displayed correctly.

 

Regards,

Nono Chen

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

              1.  
Robert14358
Resolver III
Resolver III

do the time zone functions include DST though? usually they are seperate things.

DST values are selectable, and they map accordingly. It's still your responsibility to look at the calendar as the timing of when DST goes in and out of effect around the world are wild, to say it mildly.  (Everybody is complaining about DST but nobody is brave enough to actually abolish it)

lbendlin
Super User
Super User

yes, daylight saving (not savings) time is factored in. You can use the timezone functions in Power Query to translate back and forth as needed. But as you stated behind the scenes everything is done in UTC (as it should be).

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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