The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
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 August 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
81 | |
72 | |
49 | |
41 |
User | Count |
---|---|
139 | |
119 | |
74 | |
64 | |
63 |