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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi,
I have a data set which contains various columns that have "Yes" or "No" values. I have these columns displayed in a table and want the values to change colour.
If the value is "Yes" I want the text colour to change to Red
If the value is "No" I want the text colour to remain black
After browsing around on forums I have found the below Dax and have added it to the conditional format of each column but it is not working. Any ideas on how to achieve this?
Many thanks,
E
Solved! Go to Solution.
Hi @Anonymous ,
Your Dax expression doesn't look right. For RED or GREEN color you will have to use HEX COLOR CODES. This is what Power BI understands as colours.
Try creating a measure using following dax:
@Anonymous , use the measure you created in conditional formatting with "Field" option
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
example measures
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK(Table[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Hi @Anonymous ,
Your Dax expression doesn't look right. For RED or GREEN color you will have to use HEX COLOR CODES. This is what Power BI understands as colours.
Try creating a measure using following dax:
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 51 | |
| 42 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 137 | |
| 113 | |
| 52 | |
| 37 | |
| 31 |