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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Formatiting matrix

Hello,

 

I have table of data as below :

CenterMachineinstallcheckedFilterAccountLockAccountUnlockpasswordcontrolpasswordReuseauthorizedServiceLogtimeout
apttsv1sxmus1OKOKOKOKOKKOOKOKOKOKOK
apttsv1sxmus2OKOKOKOKOKKOOKOKOKKOOK
apttsv1sxmus3OKOKOKOKOKKOOKOKOKKOOK
apttsv1sxmus4OKOKOKOKOKKOOKOKOKKOOK
apttsv1sxmus5OKOKOKOKOKKOOKOKOKKOOK
apttsv1sxmus6OKOKOKOKOKKOOKOKOKKOOK
apttsv1sxmus7OKOKOKOKOKKOOKOKOKKOOK
apttsv1sxmus8OKOKOKOKOKKOOKOKOKKOOK
apttsv2sxmus9OKOKOKOKOKKOOKOKOKKOOK
apttsv2sxmus10OKOKOKOKOKKOOKOKOKKOOK
apttsv2sxmus11OKOKOKOKOKKOOKOKOKKOOK

 

I would like to formatting the matrix below : 

vnqt_1-1672931292687.png

I am trying to format the cell:

- OK : Green

- KO : Red

- Machine  : Green if all OK

- Machine : Red if there is a KO

-Center : Green if all Machine Green (All OK)

- Center: Red if any Machine Red (If any KO)

Could you please advise ? 

Thank you in advance.

Tg

 

1 ACCEPTED SOLUTION
pi_eye
Resolver IV
Resolver IV

Further to this @Anonymous 

 

I do have a potential work-around.

First, structure the data by unpivoting it in Power Pivot and adding a column that is "1" for KO and "0" for OK:

pi_eye_0-1672939445067.png

This will then make it much easier to create a Matrix using those values!

pi_eye_1-1672939485574.png

Then, create a measure that summarises "hasKO" by making a sum of the values. We now know that if the sum = 0 there are no KO's and anything else means that there is at least one.

 

anyKO = sum(Sheet1[hasKO]) 
 
Use this measure in the conditional formatting to colour values with 0 as green and anything else as red:
pi_eye_2-1672939678645.png

This will also colour the value totals. Using the value totals as a comparison will give you an indication of the machine and server situations:

pi_eye_3-1672939739772.pngpi_eye_4-1672939758894.png

 

 

 

 HTH

 

Pi

 

 

 

 

 

 

View solution in original post

3 REPLIES 3
pi_eye
Resolver IV
Resolver IV

Further to this @Anonymous 

 

I do have a potential work-around.

First, structure the data by unpivoting it in Power Pivot and adding a column that is "1" for KO and "0" for OK:

pi_eye_0-1672939445067.png

This will then make it much easier to create a Matrix using those values!

pi_eye_1-1672939485574.png

Then, create a measure that summarises "hasKO" by making a sum of the values. We now know that if the sum = 0 there are no KO's and anything else means that there is at least one.

 

anyKO = sum(Sheet1[hasKO]) 
 
Use this measure in the conditional formatting to colour values with 0 as green and anything else as red:
pi_eye_2-1672939678645.png

This will also colour the value totals. Using the value totals as a comparison will give you an indication of the machine and server situations:

pi_eye_3-1672939739772.pngpi_eye_4-1672939758894.png

 

 

 

 HTH

 

Pi

 

 

 

 

 

 

Anonymous
Not applicable

Thank you for your suggestion. 

 

pi_eye
Resolver IV
Resolver IV

Hi Tg!

 

Formatting Cell values is simple, you can format them conditionally using a column value. Here I have created a column that corresponds to "Log" and returns a colour:

First Log Color = If(Sheet1[Log]="KO","Red","Green")
Apply this to the formatting of the Log column by clicking the drop down next to the value name, and navigating to "background color" under "conditional formatting". 
In the resulting dialogue, choose Field Value as the format Style and select the new [First Log Color] field that has been created:
pi_eye_0-1672937826202.png    pi_eye_1-1672937876805.png

When applied, this will now color your "Log" field appropriately

pi_eye_2-1672937937260.png

 

To apply this to the whole visual you will need to create one for each column in the Matrix 

 

For the Centre and Machine values, I haven't been able to find a way to colour these conditionally, yet. There is currently an idea being upvoted if you would like to partake:

https://ideas.powerbi.com/ideas/idea/?ideaid=28bbb6fd-11d5-4713-aa23-030ad77d5d4f

 

Regards,

 

Pi

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.