Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a report that is being refreshed on the service.
As with so many others I'm trying to convert UTC to a local timezone. I've read many similar posts but still not getting something quite right. My end goal is to set up a relative date filter to show data from Today. This of course works, until it is tomorrow in UTC.
Here is where I currently am
I've made copied one of my datetimestamp fields in my data set and made it into a timezone using
DateTime.AddZone([#"Login Time - Copy"],0)
from here I tried converting to my desired timezone using switchzone
DateTimeZone.SwitchZone ([Sample Login as UTC],-7)
I've then used DateTimeZone.RemoveZone([Pacific Conversion]) to try and achieve what i was after.
The end result is so far the same, I'm still stuck with today being based on UTC. What did I miss?
Thanks!
Solved! Go to Solution.
Hi @PBI_Rookie ,
You could use #duration().
https://docs.microsoft.com/en-us/powerquery-m/sharpduration
[datetime]+#duration(0,-7,0,0)DateTime.LocalNow()+#duration(0,-7,0,0)
Best Regards,
Jay
Hi @PBI_Rookie ,
You could use #duration().
https://docs.microsoft.com/en-us/powerquery-m/sharpduration
[datetime]+#duration(0,-7,0,0)DateTime.LocalNow()+#duration(0,-7,0,0)
Best Regards,
Jay
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 26 |
| User | Count |
|---|---|
| 134 | |
| 104 | |
| 63 | |
| 60 | |
| 55 |