Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
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
)
For more details,please check attached pbix file.
Best regards,
Eason
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
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?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |