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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.