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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RKM
Helper IV
Helper IV

Multiple DateTime Columns [In UTC] - How to Show in Different TimeZone [IST]

Experts,

In my PBI I have a big bulky table (Coming from SQL Server) with many columns among which 3 Datetime Columns are there.

StartTime_UTC, EndTime_UTC, Deadline_UTC

Now user wants to have an option to See these Fields in IST.

[Actually some users infact asking if we can give option to let user select which timezone to view]

 

Now one option for me is of course either I add 5hr 30mins to each columns and bring 3 additional columns either from SQL Query or Derived Column in Power BI.

But considering my table is big and lots of column already I need for my PBI dashboard, I am bit hessitent about these additional IST columns. Whether I should really go ahead and add them or there is any smarter way (performance factor etc.) to convert and/or allow user to choose timezone? 

 

Thanks much

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @RKM ,

I created some data:

vyangliumsft_0-1643183870874.png

Here are the steps you can follow:

1. Use Enter data to create a Slicer Table.

vyangliumsft_1-1643183870876.png

2. Create measure.

Measure =
MAX('Table'[Date])+DIVIDE(value(right(SELECTEDVALUE(Slice[Timezone]),1)),24)

3. Result:

Select the time zone in the slicer and the date will change accordingly

vyangliumsft_2-1643183870880.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @RKM ,

I created some data:

vyangliumsft_0-1643183870874.png

Here are the steps you can follow:

1. Use Enter data to create a Slicer Table.

vyangliumsft_1-1643183870876.png

2. Create measure.

Measure =
MAX('Table'[Date])+DIVIDE(value(right(SELECTEDVALUE(Slice[Timezone]),1)),24)

3. Result:

Select the time zone in the slicer and the date will change accordingly

vyangliumsft_2-1643183870880.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

This sounds very very promising. I'll give it a try shortly.

Still a question - From performance stand point, is it better doing in PBI or bringing it in from SQL (i.e. both Times in seperate columns. I am just worried I already pull lot of columns and if in SQL then I need to pull more columns per row). Probably your approach would be far better.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.