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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Fusilier
Helper III
Helper III

Clear all slicers button question

Hi,

I don't think this is possible, but thought I'd ask anyway.

Is there any way of formatting this button so it changes colour if any slicers are selected, therefore giving the user an indication that there are slicers selected?

1 ACCEPTED SOLUTION
shafiz_p
Solution Sage
Solution Sage

Hi @Fusilier  As I can understand that you want to change background color of Clear All Slicer button if slicer is selected. Yes this is possible. To acheive this, first create a measure to change color. 

ColorChange = IF(OR(ISFILTERED(Customer[Gender]),ISFILTERED(Customer[Education])), "Red", "White")

Now create Clear all slicer button. Go to formatting and go to fill option inside Button Style option. Click fx button, go to field value and select newly created measure. See Image below:
 
shafiz_p_0-1726307463563.png

 

 

And you are done. See the button color changed upon Gender selection. If I clear slicer, button color would white. See image below:

shafiz_p_1-1726307551037.png

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

Best Regards,
Shahariar Hafiz

View solution in original post

2 REPLIES 2
shafiz_p
Solution Sage
Solution Sage

Hi @Fusilier  As I can understand that you want to change background color of Clear All Slicer button if slicer is selected. Yes this is possible. To acheive this, first create a measure to change color. 

ColorChange = IF(OR(ISFILTERED(Customer[Gender]),ISFILTERED(Customer[Education])), "Red", "White")

Now create Clear all slicer button. Go to formatting and go to fill option inside Button Style option. Click fx button, go to field value and select newly created measure. See Image below:
 
shafiz_p_0-1726307463563.png

 

 

And you are done. See the button color changed upon Gender selection. If I clear slicer, button color would white. See image below:

shafiz_p_1-1726307551037.png

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

Best Regards,
Shahariar Hafiz

Thank you so much! Works like  dream.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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