Forum Discussion
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?
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:And you are done. See the button color changed upon Gender selection. If I clear slicer, button color would white. See image below:
Hope this helps!!
If this solved your problem, please accept it as a solution!!
Best Regards,
Shahariar Hafiz
2 Replies
- shafiz_p
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:And you are done. See the button color changed upon Gender selection. If I clear slicer, button color would white. See image below:
Hope this helps!!
If this solved your problem, please accept it as a solution!!
Best Regards,
Shahariar Hafiz- Fusilier
Helper III
Thank you so much! Works like dream.