Forum Discussion
Power BI conditional formatting text
- 6 years ago
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-numbers-in-the-column
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
- Ryanc22586 years agoHelper I
Issue solved. Thank you very much.