Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi am Marvin,
Have matrix table with different colour ranking scale Per Row (Each Row has its own scale). It has been working well in Excel Pivot tables where i apply each row with its own @conditional format color scale/rule however am trying to apply the same in PowerBI but failing.
example is as below. I failed to paste background color. so used font color to show different colors. but am interested in Background colours.
Any urgent Help will be much grateful.
| Color Ranking Key | Metric | ||
| 8-12 | 5-7 | <-0-4 | Production |
| 6 | 5 | <0-4 | Sales |
| 8-11 | 4-7 | <0-3 | data management |
| 6 | 5 | <0-4 | Management |
| 5 | 4 | <0-3 | Stores |
| 2 | 1 | 0 | Logistics |
| 4 | 3 | 2 | Planning |
| 2 | 1 | 0 | Marketing |
| 5-6 | 3-4 | < 0-2 | Accounting |
| 6 | 4-5 | <0-3 | Human resource |
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)
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.
Hi @mmalikisi,
Background color is the same setting as font. Under thr Format of this visual.
Advanced controls. Based on field , select the rank measure you created. Then add rules and click ok.
I put my pbix file in the end you can refer.
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.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |