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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Remove duplicates in ranking of 10

Good afternoon.

 

I have read a lot regarding the topic, but no matter how much I apply the examples it just doesn't work for me.

 

I have a table of products, where there are many products with their price, user. I need in a matrix to show the name of the product and the ranking considering the one that has been bought the most times.
But if there is a product that has been purchased 4 times and another that has been purchased the same 4 times, it does not make me duplicate, then when doing my ranking instead of taking 10 more purchased products it gives me 11 or 12.

 

 

image.png

How can I do it. Kindly help me.

Thx so much

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous 

I build a table like yours to have a test.

1.png

I use measures to achieve your goal.

CountBuyer = CALCULATE(COUNTROWS(Sales),FILTER(ALL(Sales),Sales[Product Name]=MAX(Sales[Product Name])))
Rank = RANKX(ALL(Sales), [countBuyer],,desc,Dense)

Result:

2.png

You can download the pbix file from this link: Remove duplicates in ranking of 10

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Anonymous
Not applicable

@Anonymous Thanks for your time and solution, Download the exercise you did, and load the data I had, but I still get duplicate results, although in the Filter on this visual part, enter top 10, it does not respect me and shows me more than 10 products.

 

https://drive.google.com/file/d/10rMaUUKArLkwV2JdTFUc5EnPE60Y_1Lc/view?usp=sharing

 

I attach the example with my data. 🙂

Anonymous
Not applicable

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, please share your solution, and Accept it as a solution. More people will benefit from it. If you are still confused about it, please share me with your pbix file from your Onedrive for Business. I don't have access to your pbix file shared in your link.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table or share me with your pbix file from your onedrive for business.

Best Regards,

Rico Zhou

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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