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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors