Forum Discussion
Time Zone Issues in Power BI Desktop with Relative Date Slicer: EST Instead of UTC
Hi Lexignot ,
According to your description, UTC standard time is used on the power bi service. So if you want to use to EST, you can use the DateTimeZone.SwitchZone function to convert this data to time zone. This way the pwoer bi service will show the US Eastern Time. The following is an example of switching the time zone and displaying it on the pwoer bi service as required
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwMFSK1QEzjGAMYxjDRCk2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Store = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Store", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "UTC Now", each DateTimeZone.UtcNow()),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "UTC EST", each DateTimeZone.SwitchZone([UTC Now],-4))
in
#"Added Custom1"
Final output
DateTimeZone.SwitchZone - PowerQuery M | Microsoft Learn
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi V-V ,
Thanks for your message. I am not sure I get it. In your answer you converted UTC Now to UTC -4 (i.e. EST). What about for each date in a given year for example?
See below, I have tried your approach but I still have the same issue with the Date Slicer. Thanks in advance for your help.