Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a Matrix visualization like below-
| Outcome | Assignment | Criteria | Score | Percentage |
| Outcome 1 | Assignemnt 1 | Criteria 1 | 4 | 22% |
| Criteria 2 | 4 | 50% | ||
| Criteria 3 | 4 | 80% | ||
| Overall | 4 | 40% | ||
| Outcome 1 | Assignment 2 | Criteria 1 | 3 | 30% |
| Overall | 3 | 35% | ||
| Criteria 2 | 3 | 40% | ||
| Outcome 2 | Assignment 4 | Criteria1 | 2 | 20% |
| Critearia2 | 2 | 5% | ||
| Overall | 2 | 6% | ||
| Outcome 3 | Assignment 4 | Criteria 1 | 1 | 7% |
| Criteria 2 | 1 | 14% | ||
| Overall | 1 | 28% | ||
Outcome, assignment, Criteria are in "rows" and score, percentage are in "Values" of Matrix visualization.
The rows that have Overall in "Criteria" column, I am hoping for "Percentage" in those rows to be color coded.
For rows having Score =4, "Percentage" should be Green,
rows having Score =3, "Percentage" should be Purple,
rows having Score =2, "Percentage" should be Yellow,
rows having Score =1, "Percentage" should be Red.
The final outcome that I am hoping for is shown below-
Can I get any help on this issue?
Solved! Go to Solution.
Hi @rohanazad94 ,
Please try below steps:
1. below is my test table
Table:
2. create a measure with below dax formula
Measure =
VAR cur_ct =
SELECTEDVALUE ( 'Table'[Criteria] )
VAR cur_score =
SELECTEDVALUE ( 'Table'[Score] )
RETURN
SWITCH (
TRUE (),
cur_score = 4
&& cur_ct = "Overall", "Green",
cur_score = 3
&& cur_ct = "Overall", "Yellow"
)
3. add a matrix visual with fields, and set condition format for "Score" field
Output:
For more details about conditional format, you can read related document: Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much @Anonymous . The solution that you provided worked.
Hi @rohanazad94 ,
Please try below steps:
1. below is my test table
Table:
2. create a measure with below dax formula
Measure =
VAR cur_ct =
SELECTEDVALUE ( 'Table'[Criteria] )
VAR cur_score =
SELECTEDVALUE ( 'Table'[Score] )
RETURN
SWITCH (
TRUE (),
cur_score = 4
&& cur_ct = "Overall", "Green",
cur_score = 3
&& cur_ct = "Overall", "Yellow"
)
3. add a matrix visual with fields, and set condition format for "Score" field
Output:
For more details about conditional format, you can read related document: Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!