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

View all the Fabric Data Days sessions on demand. View schedule

Reply
philippa_f
Frequent Visitor

DAX - Need filtered table based on two separate rankings - help!

I have a table where products appear multiple times and I need to create a subset table that just has one record for each product, based on two different scores.

I need the record chosen to be that for the MAX of RankC, but if there are multiple records for the Product with the same value for Rank C, then instead I need whichever record has the MAX of RankA. If there are multiple records with equal value for RankA then I need to show an error. Sample data here:

PRODUCTAMTRANKARANKCCATEGORY 
154640.4266723Cat1 
154641317Cat2 
155030.857Cat1 
15538022Cat1 
155380.222Cat1 
155500.1737Cat2 
155500.4637Cat2 
155500.6637Cat2 

 

Can I do this easily with DAX? Do I use FILTER or CALCULATETABLE? Not sure where to start...

 

Thanks!

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @philippa_f 

Are RankA and RankC measures or calculated columns?

How do you want the error message to be displayed? Can you share your desired result in the table?

 

Best Regards,
Community Support Team _ Eason

Hi Eason

Thanks so much for responding. No, the Rank A and Rank C are not calculations, just variables in the source data. 

What I would need to see in the new table would look like this:

 

PRODUCTAMTRANK ARANK CCATEGORYERROR?
15464

1

317CAT 1 
155030.857CAT2 
15538    ERROR
155500.1737CAT2 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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