Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
rohanazad94
Frequent Visitor

Is it possible to have certain rows in a matrix visualization to be color coded?

I have a Matrix visualization like below-

 

OutcomeAssignmentCriteriaScorePercentage
Outcome 1Assignemnt 1Criteria 1422%
  Criteria 2450%
  Criteria 3480%
  Overall440%
Outcome 1Assignment 2Criteria 1330%
  Overall335%
  Criteria 2340%
Outcome 2Assignment 4Criteria1220%
  Critearia225%
  Overall26%
Outcome 3Assignment 4Criteria 117%
  Criteria 2114%
  Overall128%
     

 

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-

Ask question.PNG

 

Can I get any help on this issue?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @rohanazad94 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1668047000945.png

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

vbinbinyumsft_1-1668047175456.png

vbinbinyumsft_2-1668047205556.png

Output:

vbinbinyumsft_3-1668047230368.png

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.

View solution in original post

2 REPLIES 2
rohanazad94
Frequent Visitor

Thank you so much @Anonymous . The solution that you provided worked.

Anonymous
Not applicable

Hi @rohanazad94 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1668047000945.png

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

vbinbinyumsft_1-1668047175456.png

vbinbinyumsft_2-1668047205556.png

Output:

vbinbinyumsft_3-1668047230368.png

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.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors