Forum Discussion
Hide/Unhide Slicer based on another slicer values
- 4 years ago
Hi Miska ,
Currently it is not possible to make another slicer invisible based on the value in the slicer. But you can hide the slicer by making the value in this slicer empty and the font and background color transparent.
The steps are as follows.
1. Create the following measures.Measure = IF ( SELECTEDVALUE ( Dates[Year] ) = 2021, COUNTROWS ( INTERSECT ( VALUES ( 'Table'[Category] ), { BLANK () } ) ), COUNTROWS ( VALUES ( 'Table'[Category] ) ) )Color = IF ( SELECTEDVALUE ( Dates[Year] ) = 2021, "#FFFFFF00" )2. Use Measure to filter the Category field in the slicer.
3. Change the Font and Background color for Category slicer, and make it transparent when 2021 is selected.
4. The final result is as follows, the Category slicer will be hidden when 2021 is selected.Note that make sure to clear the Category slicer selection before selecting 2021, otherwise the following result will be displayed.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Miska ,
Currently it is not possible to make another slicer invisible based on the value in the slicer. But you can hide the slicer by making the value in this slicer empty and the font and background color transparent.
The steps are as follows.
1. Create the following measures.
Measure =
IF (
SELECTEDVALUE ( Dates[Year] ) = 2021,
COUNTROWS (
INTERSECT (
VALUES ( 'Table'[Category] ),
{ BLANK () }
)
),
COUNTROWS ( VALUES ( 'Table'[Category] ) )
)Color =
IF (
SELECTEDVALUE ( Dates[Year] ) = 2021,
"#FFFFFF00"
)
2. Use Measure to filter the Category field in the slicer.
3. Change the Font and Background color for Category slicer, and make it transparent when 2021 is selected.
4. The final result is as follows, the Category slicer will be hidden when 2021 is selected.
Note that make sure to clear the Category slicer selection before selecting 2021, otherwise the following result will be displayed.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Jim_B3 years agoFrequent Visitor
I'm trying to do the same for a slicer that is configured as a Dropdown. Your approach works great for a Vertical List slicer with Select All disabled. I'm not able to figure out a way to hide a Dropdown slicer. Do you know of anyway to do this?
- Kishanbhise171 year agoNew Member
Hi winniz, The solution that you provided works fora slicer with vertical list with search option disabled...it doesn't not work with a drop down with search enabled.. tje slicer remains visible when search is enabled with drop-down as the fx options not available for values formatting in a slicer. Is there any custom slicer which allows fx for values formatting as well
- jwbingel4 years agoRegular Visitor
Hi v-kkf-msft Can this be done when we are trying to hide a date filter? I tried this and it doesn't appear to be working. I'm wondering if it's because it's not a text field. Thanks!
- ayush_shrma2 years agoNew Member
Hi,
Can you please explain the logic of Measure? And why can't we use justMeasure = IF(SELECTEDVALUE ( Dates[Year] ) = 2021,1,0) - AxelllD1 year agoFrequent VisitorYou are a hero