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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
hanhks
Frequent Visitor

Matrix Condition Format Base On Diagonal

I have a matrix summary check same item from 2 people. Each person has result difference with other. I make matrix compare results from them. I want to make matrix like below. Please help me, It's posible in Power BI.

Maxtrix compare 2 resultsMaxtrix compare 2 results

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @hanhks

Look at my test

1.png

in query editor, add two conditional columns

2.png

3.png

Then create a measure

Measure = IF(MAX([Custom1])>MAX([Custom2]),1,IF(MAX([Custom1])=MAX([Custom2]),0,-1))

4.png5.png

6.png

 

Best Regards

Maggie

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @hanhks

Look at my test

1.png

in query editor, add two conditional columns

2.png

3.png

Then create a measure

Measure = IF(MAX([Custom1])>MAX([Custom2]),1,IF(MAX([Custom1])=MAX([Custom2]),0,-1))

4.png5.png

6.png

 

Best Regards

Maggie

@v-juanli-msft

I tested by your guide and it's OK. Very nice. Thank you.

Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @hanhks

 

What is the rule that determines the colours?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

My expectation is cell postion (not cell value) under the diagonal line will fill blue (meaning better) and cell position upper diagonal will red color.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors