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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Super User
Super User

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
Super User
Super User

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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