Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
86 | |
80 | |
69 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |