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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Slicer Selection Conditional Formatting

Hi,

 

I would like my slicer to change color if one value is filtered. 

Below is what I've done so far but the slicer is not changing color... 

 

Slicer formatting = IF( HASONEFILTER( 'Query Answers'[Banner] ) , 1, BLANK() )

banner formatting.JPG

 

Banner formatting 2.JPG

 

As you can see above my Slicer Formatting measure has value 1 which is supposed to change the background of my slicer to Red, but nothing is happenning...

Is there something I'm doing wrong?

 

Thanks in advance,

Rob

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

To create measures as below and set conditional formatting based on Slicer formatting color.

 

Slicer formatting = IF( HASONEFILTER( 'Query Answers'[Banner] ) , 2, 0 )
Slicer formatting color = IF( [Slicer formatting]=2 , "#FF2657", BLANK() )

Capture.PNG

 

For more details, please check the pbix as attached.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
Juliecal73
Helper III
Helper III

This does not seem to work for Date Slicers with Relative Dates mode.

I have tried with a bunch of different ways, and the card I use to test changes color, but the Date Slicer never does

I am using the following measure in the Date Slicer Background conditional formatting.

 

#DateFilterColor = 
   IF(
      ISFILTERED('USA AEIOU'[SubmittedDate]),
      "#FF2657",
      "#FFFFFF00"
      )

 

 

Conditional Format Date Slicer.png

 

Thoughts?

 

v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can set condiftional formamting in backgroud pane like the picture as below.

 

Capture.PNG

 

Or you should add the banner column to the table visual as well to set condiftional formatting as the way you used before.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Hi @v-frfei-msft  ,

Thanks for your time.

 

However, I am trying to add the Conditional Formatting in background pane to a Slicer Visual, not a table.

Can you please try that for me and let me know if it works on your side?

 

Cheers,
Robin

Hi @Anonymous ,

 

To create measures as below and set conditional formatting based on Slicer formatting color.

 

Slicer formatting = IF( HASONEFILTER( 'Query Answers'[Banner] ) , 2, 0 )
Slicer formatting color = IF( [Slicer formatting]=2 , "#FF2657", BLANK() )

Capture.PNG

 

For more details, please check the pbix as attached.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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