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
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:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 35 | |
| 34 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 99 | |
| 73 | |
| 66 | |
| 65 |