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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Vasek00005
Helper I
Helper I

Let user toggle between slicers

Hi,

I have a report where users want to filter date in different ways. Sometimes they need slicer between dates and sometimes they need slicer with relative dates. I need to let them decide which slicer should be active and then totally deactivate the other one. Hiding the visual is not a solution as it still filters the report.

I use a bookmark now that toggles between the slicers. And the hidden slicer always has to be set to the widest range as possible so it not interfers the active one. But the downside of this solution is that the bookmark sets the slicer always to the same dafault dates that is unconfortable for users.

Any idea how to simple dynamicly activate/deactivate the slicer? I don't want to hide it and set dates as widest as possible. I want to toggle its entire activation.

Thanks,

vašek

3 REPLIES 3
Anonymous
Not applicable

Hi @Vasek00005 

 

My solution is as follows, you can try it out.

  • Create three auxiliary tables, two for dates(eg:BetweenDateTable, RelativeDateTable) and one for slicer selection(eg:Slicer).

1.png2.png3.png

 

 

 

 

 

 

 

4.png

 

 

 

 

  • Create slicers for these three tables separately.

5.png

 

 

 

 

 

 

 

 

  • To allow users to choose between the two date slicers, create a measure like as below:

Measure =

var _sel=SELECTEDVALUE(Slicer[Slicer Choice])

return

SWITCH(_sel,"Between",IF(ISFILTERED(BetweenDateTable[BetweenDate]),IF(MIN(Sheet1[date]) in ALLSELECTED(BetweenDateTable[BetweenDate]),1),1), "RelativeDate",IF(ISFILTERED(RelativeDateTable[RelativeDate]),IF(MAX(Sheet1[date]) in ALLSELECTED(RelativeDateTable[RelativeDate]),1),1)

)

 

  • Use this measure in your visuals, and apply filter to "is" "1".

6.png

 

 

 

 

 

 

 

 

 

  • Here's my final result, when select one slicer, the other is deactivated.

7.png

 

 

 

 

 

 

 

 

 

 

 

I hope this solution meets your requirements.

 

 

Best Regards,

Jarvis Tang

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

Vasek00005
Helper I
Helper I

Hi, thanks for reply. I user parameters for different tasks but have no idea how to implement them to dynamically activate/deactivate whole slicer. What was your idea?

DataNinja777
Super User
Super User

Hi @Vasek00005 ,

 

Did you try using field parameters to dynamically toggle slicer fields?  

https://community.fabric.microsoft.com/t5/Desktop/Field-Parameters-or-Bookmark/td-p/2787842

Best regards,

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors