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.
There is no off-the-shelf way in Power BI to control the visibility of a slicer's values dynamically (No *fx* button next to the value font color selection). However, you can show or hide one slicer (slicer 2) based on the selected value of another slicer (slicer 1) by applying the below work around. It's a solution using bookmarks:
Scenario:
I have 2 slicers, Slicer 1, called "Currency" and Slicer 2 called " Rate".
Slicer 1 has 2 options " Global" and "Local".
Slicer 2 has 2 options "Fixed" and "Variable"
Business Requirement:
The need is to give the user the option to select between Fixed and Variable rates when the user selects Global currency.
When the user selects Local currency, the 2nd slicer is irrelevant. Hence it should be hidden.
Solution:
Create 2 bookmarks and name them "ShowRate" and "HideRate"
insert 2 completely transparent rectangles and place them on top of each radio button/switch of "Globa" and "Local" option of slicer 1: Currency
Update the "ShowRate" bookmark - while selecting Rate Slicer - visible, currency slicer (selected to global) - visible.
Then update "HideRate" bookmark - while selcting Rate Slicer - imvisible, Curreny Slicer (toggled to Local) - Visible
Tick marked to "Data" and "Selected Visuals" for both updation.
Result:
Now upon clicking on the Global button you can show the Rate Slicer
While selecting the Local option in Currency will hide the Rate slicer
Point to not that when the user is clicking on the Currency sliceer, it's appearing that they are clicking on the slicer radio button but actually they are clicking two imvisible bookmarks that hide or show the other visual.
- Kishanbhise171 year agoNew Member
Hi v-kkf-msft The solution works if the slicer is a vertical list ,but it doesn't work with a drop-down slicer with search enabled,the slicer will still remain visible with drop-down and search enabled options. The values formatting doesn't have fx option and that is the causing the problem..