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
AdamRobC
Helper II
Helper II

Use SWITCH to create a dynamic slicer for dimension values

Hi,

 

I currently have various dynamic time period columns set up in my date table using DAX and based on the TODAY() function (e.g. if relative week = -1 then "Last Week" etc.)

 

I would like to use the SWITCH function to have one slicer where the user can flip between various 'fixed' time periods, which dynamically updates charts to show data for that time period.

 

At the moment I have the below set up in 3 separate slicers, which works ok but would be better to have everything in one slicer if possible.

 

AdamRobC_0-1602160762028.png

 

Thanks,

Adam

 

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @AdamRobC ,

 

Based on your description, I can't know what kind of results you want. It needs to be clarified that the calculated columns cannot be dynamic and will be recalculated every time they are refreshed. Measure cannot be used as a slicer, it can be used as a slicer's visual level filter.So what kind of results do you expect?

 

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

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.