Forum Discussion
Advanced Conditional formatting in Matrix table
Many thanks for the help. However you may notice that your using only one scale for all the value fields.
Am interested in each Table Row Background color having its own Color scale . and Remember. Have unpivoted my columns. so under Format by Rule based on field, Its brings single field and yet am interested in giving backgorund color for each Unpivotted fields basing on different color scales. e.g using your example;
Assuming ID has this color scales
A001: Red(0 - 2) Yellow (3 - 4) Green (5-6)
A002: Red(0 - 4) Yellow (5 - 6) Green (6-8)
A004: Red(0- 10 ) Yellow (11 - 20) Green (21-30)
- v-chenwuz-msft4 years agoCommunity Support
Hi mmalikisi ,
Is that the result you want ?
Code
example value rules = VAR _s = SELECTEDVALUE( 'Table'[ID] ) VAR _r_A001 = SWITCH( TRUE(), [Example value] >= 0 && [Example value] <= 2, "red", [Example value] >= 3 && [Example value] <= 4, "yellow", "green" ) VAR _r_A002 = SWITCH( TRUE(), [Example value] >= 0 && [Example value] <= 4, "red", [Example value] >= 5 && [Example value] <= 6, "yellow", "green" ) VAR _r_A004 = SWITCH( TRUE(), [Example value] >= 0 && [Example value] <= 10, "red", [Example value] >= 11 && [Example value] <= 12, "yellow", "green" ) RETURN SWITCH( _s, "A001", _r_A001, "A002", _r_A002, "A004", _r_A004, "BLACK" )Advance control:
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.