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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pborah
Solution Sage
Solution Sage

Date-Time in production report not displaying correctly in comparison to test version/workspace?

This is a bit odd?

 

So in desktop when designing the report, in Power query, I created a last refreshed date table by using -

 

= DateTimeZone.SwitchZone(DateTimeZone.UtcNow(),-4)

 

Which works exactly as expected both locally and when published to service in the Test workspace. When I deploy this to the production workspace using the deployment pipeline, things act in a strange manner and the time shows UTC instead of the -4 hours offset which is Eastern Time. I have double, triple checked that I deployed the correct report and semantic model. 

 

Any ideas as to what is going on?

1 ACCEPTED SOLUTION
Sahir_Maharaj
Super User
Super User

Hello @pborah,

 

Although Power BI generally uses UTC for service operations, differences in regional settings between workspaces could lead to this behavior.

 

Can you please try this approach:

LastRefreshedDate = 
DateTimeZone.RemoveZone(DateTimeZone.ToLocal(DateTimeZone.UtcNow()))

Hope this helps.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @pborah 

 

Did Sahir_Maharaj 's method solve your problem? If yes, could you please mark it as a solution? This will be of great help to other users experiencing similar problems. Thank you!

 

If you have any further questions, please feel free to contact me.

 

Best Regards,
Yulia Xu

Sahir_Maharaj
Super User
Super User

Hello @pborah,

 

Although Power BI generally uses UTC for service operations, differences in regional settings between workspaces could lead to this behavior.

 

Can you please try this approach:

LastRefreshedDate = 
DateTimeZone.RemoveZone(DateTimeZone.ToLocal(DateTimeZone.UtcNow()))

Hope this helps.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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