Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
49 | |
38 | |
38 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |