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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Hide button based on slicer choice

I have a slicer with four options. One of the options needs to have a unique button on one of the visuals, whereas the other three should not. How do I manage to hide the button when selecting all but that one specific filter?

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Anonymous - You need to create a DAX measure that returns a value indicating whether the button should be shown or hidden. For example, if your slicer has the options "Option 1," "Option 2," "Option 3," and "Option 4," and you want the button to only appear when "Option 1" is selected, the measure can look like this

ButtonVisibility =
IF (
SELECTEDVALUE(SlicerTable[Option]) = "Option 1",
1,
0
)

 

More details and reference links below:

https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/

Create buttons in Power BI reports - Power BI | Microsoft Learn

How to create Show Hide Button in Power BI using Bookmark & Button (youtube.com)

Solved: Hide un Hide buttons Based on Data - Microsoft Fabric Community





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
Pranar786
Frequent Visitor

But the request was to hide the button visual, if we use a card visual to hide how will the button actions work?

rajendraongole1
Super User
Super User

Hi @Anonymous - You need to create a DAX measure that returns a value indicating whether the button should be shown or hidden. For example, if your slicer has the options "Option 1," "Option 2," "Option 3," and "Option 4," and you want the button to only appear when "Option 1" is selected, the measure can look like this

ButtonVisibility =
IF (
SELECTEDVALUE(SlicerTable[Option]) = "Option 1",
1,
0
)

 

More details and reference links below:

https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/

Create buttons in Power BI reports - Power BI | Microsoft Learn

How to create Show Hide Button in Power BI using Bookmark & Button (youtube.com)

Solved: Hide un Hide buttons Based on Data - Microsoft Fabric Community





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors