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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Background colour conditional formatting in slicer is acting weird

I'm trying to incorporate background colour conditional formatting on the PBI slicer visual. If a value in the slicer is selected the background should change to grey else the default is white. But its acting weird. The background doesnt change when I select a value but when I copy the slicer the background changes in the copied slicer. Anyone having the same issue ?

 

My DAX is

 

Calendar Year_Slicer background colour =
VAR _count =
    COUNTROWS ( DISTINCT ( 'Calendar'[CalendarYear] ) )
VAR _countall =
    CALCULATE (
        COUNTROWS ( DISTINCT ( 'Calendar'[CalendarYear] ) ),
        ALL ( 'Calendar'[CalendarYear] )
    )
RETURN
    IF ( _count = _countall"#FFFFFF""#CCCCCC" )

I have tried using ISFILTERED as well but to no avail.

Im using May 2021 PBI version. Tested it on another computer with same version and same results

 

video 

 

Status: New
Comments
v-chuncz-msft
Community Support

@Capstone 

 

This is by design.

The source visual doesn't filter itself, it filters other visuals (target visuals).