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
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
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.