Forum Discussion
Power Bi Dynamic Time Zone Transformation
- 1 year ago
Thanks Musab-Ali for the follow-up, I completely understand your scenario now. Since your dashboard depends on the User_Joined_Date field and you need full interaction with a third-party date picker and slicers, the best way to support dynamic time zone switching (without breaking model relationships) is to handle the timezone transformation at the data level instead of relying on dynamic measures.
Here’s the solution that works perfectly with slicers, relationships, and full dashboard interactivity:
- In Power Query, create multiple versions of the Users table — one for each timezone you want to support (e.g., PST, UTC, IST, etc.).
- In each copy, add a new column that adjusts the User_Joined_DateTime_UTC based on that timezone's offset.
- Add a [TimeZone] column to identify the timezone of each record.
- Append all these tables into a single combined table (Users_AllTZ).
- In your model, relate the User_Joined_LocalDate (from the adjusted datetime) to your existing Date table.
- Add a slicer using the [TimeZone] column. When a user selects a timezone, the whole dashboard (including visuals and the date picker) will reflect the adjusted local time.
This approach avoids the limitations of dynamic measures, ensures that your date picker continues to work properly, and lets users switch timezones across the entire dashboard without needing to duplicate visuals or reports.
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.Best Regards,
Tejaswi.
Community Support
One option would be to create a column for each the date in each timezone you want to cater for.
Before you split the datetime into separate columns you could add a new column using the DateTimeZone.SwitchZone function and then keeping just the date part.
Create inactive relationships from the Date table to each timezone date column and then create a calculation group, with calculation items for each timezone. Each item would have the same format but use the appropriate relationship for that timezone, e.g.
PST =
CALCULATE (
SELECTEDMEASURE (),
USERELATIONSHIP ( 'Date'[Date], Users[PST Date] )
)
By putting the calculation items into the slicer the user will be able to select which one they want to see.
You would probably want to hide all the date columns in report view, and always use columns from the Date table in any visuals so that the correct date is displayed.