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
joebern
Frequent Visitor

Adding a Time Zone Slicer [DAX]

Hello. I am trying to create a Proof of Concept for a client to demonstrate how they can implement a slicer to shift their time data based on time zone. I know similar questions have been asked and answered, but I still can't reproduce the solutions I have seen. 

 

Here is my current workspace: 

timezonetest.PNG

I have tried a few different formulas, including: 

OffsetTime = 
    var IntOffset = SELECTEDVALUE('TimeZone Offset Dim'[offset], 0)
    return FORMAT([Date] + DIVIDE(IntOffset,24,0), "General Date")

As my screenshot shows, IntOffset correctly shows the integer of hours I want to shift, but the OffsetTime continues to show the same value as the original Date value. 

 

Does anyone have advice for this?

4 REPLIES 4
Chaitanya_Pudi
New Member
d_gosbell
Super User
Super User

Have you created OffsetTime as a measure or a calculated column? Calculated columns get calcuated once and do not change in response to filter selections. Measures are calculated dynamically and do change in response to changes in filters. You issue suggests that maybe you've created this as a column.

OffsetTime is indeed a calculated column. I need this function to offset the incoming datetime data by the selected number of hours, therefore the output needs to be calculated on a per-row basis. 

 

Additionally, I have created IntOffset, which is a measure that returns a single integer. I tried creating it both as a var (seen above), and also as its own measure to try to make this work.

Hey Did you got any solution on this? I am facing the same issue.. will you please let me know

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.