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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
vkr057
New Member

Converting and showing times zones from MST,GMT and selected timezone based on the country selection

Hi Team,
I have a requirement of showing times zones( MST,GMT local timezone) based on the country selected in the Country filter.
Could we able to achieve by using Dax. we don't have previlige to create an custom column. 

 

Reference Image:

vkr057_0-1737113354522.png

 

2 ACCEPTED SOLUTIONS
rohit1991
Super User
Super User

HI @vkr057 ,

To dynamically display MST, GMT, and local times based on country selection in Power BI using DAX:

Create DAX Measures:

 

UTC : CurrentUTC = NOW() - TIMEZONEOFFSET(),


MST : MST_Time = CurrentUTC + (LOOKUPVALUE('Offsets'[MST Offset], 'Offsets'[Country], SELECTEDVALUE('CountryTable'[Country])) / 24),

GMT: GMT_Time = CurrentUTC,

Local Time: Local_Time = CurrentUTC + (LOOKUPVALUE('Offsets'[Local Offset], 'Offsets'[Country], SELECTEDVALUE('CountryTable'[Country])) / 24)

 

Add these measures to a table or card visual. Use the Country filter to dynamically update times. Ensure the Offsets table maps countries to their respective time zone offsets.

 

 

 

 

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

AnkitKukreja
Super User
Super User

Hi! @vkr057 

 

Prepare a table with the mapping of countries to their respective time zones. For example:

 

Country TimeZoneOffset TimeZoneAbbreviation
USA (MST) -7 MST
UK (GMT) 0 GMT
India (IST) 5.5 IST

 

Add a Country Slicer to your report.

 

Measure for LocalDateTime =
VAR SelectedOffset = SELECTEDVALUE(TimeZoneTable[TimeZoneOffset])
RETURN
IF(
NOT ISBLANK(SelectedOffset),
DATEADD(Dataset[UTCDateTime], SelectedOffset * 60, MINUTE),
BLANK()
)

 

Measure  for MSTDateTime = DATEADD(Dataset[UTCDateTime], -7 * 60, MINUTE)

 

Measure for GMTDateTime = DATEADD(Dataset[UTCDateTime], 0 * 60, MINUTE)

 

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

View solution in original post

2 REPLIES 2
AnkitKukreja
Super User
Super User

Hi! @vkr057 

 

Prepare a table with the mapping of countries to their respective time zones. For example:

 

Country TimeZoneOffset TimeZoneAbbreviation
USA (MST) -7 MST
UK (GMT) 0 GMT
India (IST) 5.5 IST

 

Add a Country Slicer to your report.

 

Measure for LocalDateTime =
VAR SelectedOffset = SELECTEDVALUE(TimeZoneTable[TimeZoneOffset])
RETURN
IF(
NOT ISBLANK(SelectedOffset),
DATEADD(Dataset[UTCDateTime], SelectedOffset * 60, MINUTE),
BLANK()
)

 

Measure  for MSTDateTime = DATEADD(Dataset[UTCDateTime], -7 * 60, MINUTE)

 

Measure for GMTDateTime = DATEADD(Dataset[UTCDateTime], 0 * 60, MINUTE)

 

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904
rohit1991
Super User
Super User

HI @vkr057 ,

To dynamically display MST, GMT, and local times based on country selection in Power BI using DAX:

Create DAX Measures:

 

UTC : CurrentUTC = NOW() - TIMEZONEOFFSET(),


MST : MST_Time = CurrentUTC + (LOOKUPVALUE('Offsets'[MST Offset], 'Offsets'[Country], SELECTEDVALUE('CountryTable'[Country])) / 24),

GMT: GMT_Time = CurrentUTC,

Local Time: Local_Time = CurrentUTC + (LOOKUPVALUE('Offsets'[Local Offset], 'Offsets'[Country], SELECTEDVALUE('CountryTable'[Country])) / 24)

 

Add these measures to a table or card visual. Use the Country filter to dynamically update times. Ensure the Offsets table maps countries to their respective time zone offsets.

 

 

 

 

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.