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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
klehar
Helper V
Helper V

Color Coding Matrix based on Average Total Value

Hi,

 

I have 2 tables

Dimension Geo which has 3 values

Geo
North America
India
China

 

 

 

Fact Escalation : which has a measure called % Esclalation measure

 

 

GeoOpp IDType
North Americaop1Escalated
North Americaop2Normal
North Americaop3Normal
North Americaop4Normal
North Americaop5Normal
Indiaop6Escalated
Indiaop7Normal
Indiaop8Escalated
Indiaop9Normal
Indiaop10Normal
Chinaop11Normal
Chinaop12Normal
Chinaop13Escalated
Chinaop14Escalated
Chinaop15Escalated

 

% esclation = 
var nr = calaculate(distinctcount(opp id), type = "Escalated")
var dr = calculate(distinctcount(oppid))

RETURN divide(nr,dr,0)

 

All I want is a matrix like this with color coding 

If value of geo < average then red else green.

klehar_0-1715782947856.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @klehar ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. Create a measure as below to get the average value

Average = AVERAGEX(ALLSELECTED('Geo'[Geo]),[% esclation]) 

2. Create a measure as below

Conditional formatting = IF ( ROUND ( [% esclation], 2 ) < ROUND ( [Average], 2 ), "red", "green" )

3. Apply the conditional formatting on the matrix

vyiruanmsft_0-1715828152246.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @klehar ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. Create a measure as below to get the average value

Average = AVERAGEX(ALLSELECTED('Geo'[Geo]),[% esclation]) 

2. Create a measure as below

Conditional formatting = IF ( ROUND ( [% esclation], 2 ) < ROUND ( [Average], 2 ), "red", "green" )

3. Apply the conditional formatting on the matrix

vyiruanmsft_0-1715828152246.png

Best Regards

klehar
Helper V
Helper V

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.