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
Anonymous
Not applicable

Filter based off conditional format colours

Is it possible to filter by colour / add a slicer to filter by colour on table that has conditional formatting on?

i.e. I have a row of reds and greens based off of positive and negative figures - is there an option similar to excel where you can filter by colour?

 

Example

 

Data
0.15
1.2
-0.33
-1.6
2.1

 

I want to be able to select the column (similar to sort) or select a slicer option that would then allow me to choose between showing only reds and greens

e.g. Select only Green = 

Data
0.15
1.2
2.1

 

I've searched and watched some videos but can't see this has been discussed, but feel like it would be an option somewhere?

Many thanks!

EDIT: I have two colours - Red and Green. Anything below 0 is Green and anything above 0 is Red.  
This column is based off a measure which calculates the difference between 2 other measures.
Would this impact any calcs?
I've created a colour table as suggested in one of the posts but can't get it to run off the measures.

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi , @Anonymous 

Please follow these steps: 

1.create a measure and apply it to "font color conditional formatting。

 

color formatting = IF(SELECTEDVALUE('Table'[Data])<0,"green","red")

 

 

 

2.create another calculated table as below:

 

Slicer table = DATATABLE("Value",STRING,{{"All"},{"red"},{"green"}})

 

3. create a table control visual as below ,then apply it to visual filter pane

 

Visual control = 
SWITCH (
    SELECTEDVALUE ( 'Slicer table'[Value] ),
    "green", IF ( SELECTEDVALUE ( 'Table'[Data] ) < 0, 1, 0 ),
    "red", IF ( SELECTEDVALUE ( 'Table'[Data] ) > 0, 1, 0 ),
    1
)

 

14.png

For more details,please check attached  pbix file.

 

Best regards,

Eason 

 

 

Pragati11
Super User
Super User

Hi @Anonymous ,

 

There is an existing thread with a workaround for this. Check if this helps:

https://community.powerbi.com/t5/Desktop/Filter-Data-based-on-Color/td-p/735716

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Thank you, I have had a look at this but doesnt seem to work even when trying to adapt.

I simply have two colours - red and green. Anything below 0 is Green and anything above 0 is Red.

This column is based off a measure which calculates the difference between 2 other measures.

Would this impact the calc?

I've created the colour table but can't get it to run off the measures?

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.