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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dynamic Matrix with Conditional Formatting to Color Cells

Hello everyone,

 

I am currently working with a dataset of a risk register where a risk is identified and then a score is assigned to it from 1 to 5. 
The risk has two criteria for scoring: Impact and Probability. The total risk score is given by Total Score= Impact Score x Probability Score. 
So a risk can have a minimum score of 1x1=1 and maximum score of 5x5= 25. Based on the total score, the level of the risk is classified as:
Low (color coded green, total score 1-3)
Medium (color coded blue, total score 4-7)
High (color coded yellow, total score 8-14)
Extreme (color coded red, total score 15-25)

I created a matrix that counts each risk falling under a category - for example, Impact Score= 3 , Probability Score =2 , Total Score = 3x2=6 so it's a medium risk therefore color code blue. So this risk would be counted under the 3rd impact column and 2nd probability column. Here is a picture of my visual:

image.png
I used a matrix visual to populate the risk counts and added an image with the same size behind it and made the matrix background 100% transparent. The issue is that if I use a slicer on the visual, some columns and rows will disappear and the picture won't be aligned so there color coding will be wrong:
The "Frequent/Certain >65%" row and "Catastrophic" column disappeared so the risk counts are falling behind the wrong colors.The "Frequent/Certain >65%" row and "Catastrophic" column disappeared so the risk counts are falling behind the wrong colors.
The color coding should be like this. I manually shifted the background image up as an example.The color coding should be like this. I manually shifted the background image up as an example.
Any better ideas of going about this would be appreciated. The matrix needs to be sliced, but this method is not working for me. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

To provide an update, here's what the matrix looks like and will stick to:image.png

I left the matrix without the background image and this is what it currently looks like. It seems that Power BI doesn't have the feature to color those white cells since they have no values. Perhaps that should be an enhancement to the matrix visual in the future, but for now I'll stick with this.

 

 

View solution in original post

3 REPLIES 3
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You have used the conditional format to customize color, didn't the result meet your requirement ? You may delete the background image , then the Matrix visual will be filtered according the slicer visual.

 

Best Regards,

Amy

 

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

 

 

Anonymous
Not applicable

@v-xicai ,

My first idea was to conditionally format the matrix, however the issue is in some cells (eg. rare/incidental <1% probability, catastrophic Impact)  there are no records with those scores so Power BI doesn't allow me to conditionally format the matrix.
Right now I am not conditionally formatting the matrix - I just aligned the picture in the background with the matrix. The issue is that when I slice the matrix some columns or rows disappear and matrix is misaligned with the image. So I'm looking for a better solution.

Anonymous
Not applicable

To provide an update, here's what the matrix looks like and will stick to:image.png

I left the matrix without the background image and this is what it currently looks like. It seems that Power BI doesn't have the feature to color those white cells since they have no values. Perhaps that should be an enhancement to the matrix visual in the future, but for now I'll stick with this.

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.