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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
RLSid17
Helper III
Helper III

Conditional Formatting Matrix Multiple Columns

Hi,

I have here a matrix that counts all the responses and shows the value as a percentage of the row total:

RLSid17_0-1667238790170.png

Is there a way to at least make the whole column of each with different colors?

Unfavorable - Red
Neutral - Yellow
Favorable - Green

I tried the usual conditional formatting where the lower the value, the red it gets and the higher the value, the green it gets but this is the result: 

RLSid17_1-1667239067204.png


The colors are not matching up. Please note that these are not columns. They are rows that were put in columns to count each and get the percentage of the row total per category. Any help would be appreciated!

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @RLSid17 ,

According to your description, I create a sample.

vkalyjmsft_0-1667270774117.png

Here's my solution.

1.Put Catetory in Matrix Rows, put Vote both in Matrix Columns and Values. In Values field, select Count and Show value as Percent of row total.

vkalyjmsft_1-1667271110381.png

2.Create a measure.

Color =
SWITCH (
    MAX ( 'Table'[Vote] ),
    "Favorable", "Green",
    "Unfavorable", "Red",
    "Neutral", "Yellow"
)

3.In the Values pane, select Conditional formatting>Backgroud color.

vkalyjmsft_2-1667271323208.png

Select Field value style and select the measure in the option.

vkalyjmsft_4-1667271427194.png

Get the correct result.

vkalyjmsft_5-1667271483144.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @RLSid17 ,

According to your description, I create a sample.

vkalyjmsft_0-1667270774117.png

Here's my solution.

1.Put Catetory in Matrix Rows, put Vote both in Matrix Columns and Values. In Values field, select Count and Show value as Percent of row total.

vkalyjmsft_1-1667271110381.png

2.Create a measure.

Color =
SWITCH (
    MAX ( 'Table'[Vote] ),
    "Favorable", "Green",
    "Unfavorable", "Red",
    "Neutral", "Yellow"
)

3.In the Values pane, select Conditional formatting>Backgroud color.

vkalyjmsft_2-1667271323208.png

Select Field value style and select the measure in the option.

vkalyjmsft_4-1667271427194.png

Get the correct result.

vkalyjmsft_5-1667271483144.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Thank you! This works perfectly! Last query, is there a way to colour the empty data?

Hi @RLSid17 ,

It's my pleasure!
Unfortunately the empty data cannot be colored.

 

Best Regards,
Community Support Team _ kalyj

No worries! I was able to just change the color of the background values to Grey while it retains the conditional formatting.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors