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
Hello
I would like to set the conditional formatting of color for the lable column as below. I tried several measure in this community, and it does not work. It appears the isssu is caused by the special character in the column text. Please help.
Thanks
JIN
Solved! Go to Solution.
@Ryanc2258 , if you have created a measure like these
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"))
Color = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")
In conditional formatting, you have to choose field option and then this measure.
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Hi @Ryanc2258 ,
How did you make conditional formatting for Label field? Set the background color of Lable filed to the color in the double quotes of the corresponding field value? If yes, you can create a measure as below and format Label field base on this new created measure... I created a sample pbix file for you, you can also get other methods from the sample file.
Measure =
VAR _label =
MAX ( 'Conditional Formatting_2'[Label] )
VAR _llabel =
LEFT ( _label, LEN ( _label ) - 1 )
RETURN
RIGHT ( _llabel, LEN ( _llabel ) - 1 )Best Regards
Rena
Issue solved. Thank you very much.
@Ryanc2258 , if you have created a measure like these
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"))
Color = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")
In conditional formatting, you have to choose field option and then this measure.
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |