Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
DATE from SQL Server (in PST) treated as UTC when imported into Power BI and published to the service?
Hi experts,
I have a question about time zone handling in Power BI.
In my SQL Server source, I have a column called TXN_DATE from the DATE_TIME_V view. This column is already in Pacific Time (PST/PDT) as confirmed by our database administrator.
When I import this data into Power BI Desktop and build my report, it appears to interpret the datetime as UTC (even though it's already PST in the source). Then, when I publish the report to Power BI Service, will it continue to treat the data as UTC? Or will the original PST time be preserved?
I'm especially concerned about:
Whether Power BI assumes UTC if no timezone is specified.
How this affects incremental refresh, filtering, and scheduled refresh.
If I need to manually convert the datetime to PST in Power Query using DateTimeZone.SwitchZone.
What is the best practice to make sure my Power BI report correctly reflects the original PST time from the SQL Server?
Thanks in advance for your help!
Solved! Go to Solution.
Hi @manoj_0911 ,
Thanks for the clarification. Just to summarize for others who might have a similar scenario.
Add this in M language.
DateTimeZone.SwitchZone([TXN_DATE], -8) or use -7 during daylight saving time, or make it dynamic.
By applying DateTimeZone.SwitchZone, you’re explicitly telling Power BI what the timezone is which avoids unexpected shifts and ensures consistent behavior both in Desktop and Service environments.
If this response helps, consider marking it as “Accept as solution” and giving a “kudos” to assist other community members.
Regards,
Akhil.
Hi @manoj_0911 ,
You need to convert your datetime to datetimezone first, then use SwitchZone. Try this in Power Query:
DateTimeZone.SwitchZone( DateTimeZone.From([TXN_DATE]), -8 )
For PST with basic DST handling:
DateTimeZone.SwitchZone( DateTimeZone.From([TXN_DATE]), if Date.Month([TXN_DATE]) >= 3 and Date.Month([TXN_DATE]) <= 10 then -7 else -8 )
Why this matters:
The key thing I missed in my research - you can't use SwitchZone directly on datetime fields from SQL. You have to convert to datetimezone first using DateTimeZone.From().
This should keep your times consistent between Desktop and Service.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.
Hey @manoj_0911 ,
Just checking in one last time haven’t seen you back in a while. As per the Microsoft Fabric Community Forum guidelines, we’ll go ahead and close this thread for now. If your issue has already been resolved, that’s great to hear.
But if you still need help down the line whether it’s with incremental refresh, time zone handling, or anything else feel free to create a new post anytime. The community is always here to support you.
Regards,
Akhil.
Hi @manoj_0911 ,
Just looping back one more time were you able to test the DateTimeZone.SwitchZone fix in your Power BI Service setup? If it resolved the issue or if you’ve tried a different approach, it would be great to hear what worked for youit could really help others facing a similar problem. And of course, if you’re still troubleshooting or need help with incremental refresh or time zone logic, happy to jump in and assist further. Looking forward to your update.
Regards,
Akhil.
Hi @manoj_0911 ,
Glad the explanation helped. Just checking back did applying the DateTimeZone. SwitchZone fix the issue for you in Power BI Service? Also, if you're using dynamic daylight saving adjustments or setting this up with scheduled/incremental refresh, happy to help if you run into anything specific. Would it hear if this worked out feel free to update.
Regards,
Akhil.
Hi @manoj_0911 ,
Thanks for the clarification. Just to summarize for others who might have a similar scenario.
Add this in M language.
DateTimeZone.SwitchZone([TXN_DATE], -8) or use -7 during daylight saving time, or make it dynamic.
By applying DateTimeZone.SwitchZone, you’re explicitly telling Power BI what the timezone is which avoids unexpected shifts and ensures consistent behavior both in Desktop and Service environments.
If this response helps, consider marking it as “Accept as solution” and giving a “kudos” to assist other community members.
Regards,
Akhil.
Hi @manoj_0911 Power BI treats datetime values as UTC if no timezone is specified, potentially misinterpreting your PST data. Use DateTimeZone.SwitchZone in Power Query to convert the PST datetime explicitly to UTC. This ensures consistency during incremental and scheduled refreshes. Standardizing datetime handling in Power Query helps maintain accurate timezone representation.
User | Count |
---|---|
64 | |
59 | |
47 | |
33 | |
32 |
User | Count |
---|---|
84 | |
75 | |
56 | |
50 | |
44 |