March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi!
I am looking to hide slicer 1 based on values selected on Slicer 2 on my PowerBI report. For example if I select 2021 on slicer 2 I want the Slicer 1 to be hidden or invisible, whereas if I select any other year on slicer 2 , the slicer 1 should re appear with the values available to choose from. Is this possible to do so by any chnace and if so would really appreciate your help with it.
Thanks
Solved! Go to Solution.
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.
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.
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.
Hi,
Can you please explain the logic of Measure? And why can't we use just
Measure = IF(SELECTEDVALUE ( Dates[Year] ) = 2021,1,0)
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?
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!
@Miska , I doubt you can hide slicer based on the value of another slicer, May be you can make font color and background color as transparent
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |