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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ghaines
Resolver I
Resolver I

Formatting for active slicer

I have a number of slicers on a page, many of them need to be drop down type, and it would be helpful to give the user some kind of feedback that a particular slicer is active.  I'm trying to make the background vary using a measure (adding a green tinge if the slicer is being used).  Is there a measure that I can use to detect if the slicer is actively being used?  ISFILTERED is only working if there is another filter acting on it from externally
 
IF(ISFILTERED('Regions'[Region]),
"rgba(192,255,255,0.2)",
"rgba(255,255,255,0.2)"
)
 
I also tried

SemiTransRegion =
VAR OptionsCount = COUNTROWS(ALLSELECTED('Regions'[Region]))
VAR SelectedCount = DISTINCTCOUNTNOBLANK('Regions'[Region])

RETURN
IF(OptionsCount <> SelectedCount,
"rgba(192,255,255,0.2)","rgba(255,255,255,0.2)")

 

 

I'm not even sure if each of these VAR is evaluating to "all options" or "selected options", since I can't see their values within the same slicer visual, and if I return the colour and the VAR in separate measures in a table, they do not change in the same way as they must be in the slicer, as I get results in the table that should be useful.

1 ACCEPTED SOLUTION
ghaines
Resolver I
Resolver I

I found a solution using no background for the slicer, with a shape behind with colour defined using ISFILTERED.  I believe there is no solution to change the background directly as per the initial spec.

View solution in original post

1 REPLY 1
ghaines
Resolver I
Resolver I

I found a solution using no background for the slicer, with a shape behind with colour defined using ISFILTERED.  I believe there is no solution to change the background directly as per the initial spec.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.