Forum Discussion
Custom conditional Formatting for matrix per row different threshold for same row by filter on table
- 6 years ago
Hi kyrpav ,
Currently, conditional formatting in matrix is based on all values of the matrix. You cannot apply it based on individual rows. Would you please vote for the similar idea in Power BI forum which has been submitted to improve Power BI and make this feature coming sooner.
As a workaround, I suggest you create a calculated column like:
Calculated column = SWITCH(TRUR(),([Employee] = "Geogre" && Type = "Car1" && [salesamount] > 120K) ||([Employee] = "Geogre" && Type = "Car2" && [salesamount] > 200K),1 ,……………Then create conditional format based on the new column:
For more details, please refer to https://www.cloudfronts.com/conditional-formatting-by-row-in-a-matrix/
Best Regards,
Dedmon Dai
kyrpav , Did not get it completely. Create a complex color formula base don need. example
Color Date = if(FIRSTNONBLANK(Table[date],TODAY()) <today(),"lightgreen","red")
if(FIRSTNONBLANK(Table[Value],"true") "true","green","red")
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")
You can use this in color formatting after using "Field" option
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values