Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Top10 + Others with duplicate values

Hi, 

 

In the past I was able to create a calculated column that made Top10+Others working

Sales Top10+Others =

VAR RankProductbySales = RANKX(All('Product'), [Sum Sales Quantity] ,,DESC)

RETURN

IF (RankProductbySales<=10,'Product'[productname], "Others")

That worked. But it worked because productname was unique in the table.
I recreated this in the attached pbix. Table Product_V1 connected to Sales and as you can see in the visual with column 'Product_V1' it gives the right result.

But I created a second version, table Product_V1. This reflects my current challenge, wehereby this Product_v2 is just very simplified.
The issue is that I now want to Rank by owner. But an owner can have multiple products. In other words, the owner is not unique in the product table.
How do I do this?

If you look at the left visual with column 'owner' it is rnked on product. But I want it to be ranked as shown in the left visual with column 'owner'. Whereby it contains three lines: Rob with 1125, John with 700 and Others with 1225.

https://www.dropbox.com/scl/fi/acmlmt4cvgmrd9ckj1en8/TopN-Others_2.pbix?rlkey=n5unb6h8hfq6uh8y1ulnbekp3&st=qrbchmbt&dl=0 

https://www.dropbox.com/scl/fi/05u3t9mwp73l9op2ys7gi/TopN-Others_2.xlsx?rlkey=04cjme3h457abgyjfpw2omy5q&st=zzlz25so&dl=0 

Hope someone can help.
lbendlin 
bhanu_gautam 

Regards Ron

2 Replies