Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Show Date/time based on user's time zone

Hi all, I have a date column and I want to show it dynamically based on the user's time zone.   I changed the format of the column to date/time/timezone and I thought Power Bi would handl...
  • danextian's avatar
    2 years ago

    Hi Anonymous 

    While M has built-in functions to handle timezones, none of them automatically shifts to the user's. The service uses Utc while Desktop is the user's. M will not know what timezone those datetimes are in so any datetime column converted to datetimezone will be +0 if refreshed in the service. You can convert a datetime column to datetimezone with an offset value (like 10.5 for GMT+10:30) using DateTimeZone.AddZone but knowing what timezone to add is key. Either way, you get to select and load only a specific timezone - Utc or user-defined.