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