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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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