Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

RANKX within groups without creating multiple tables

Hi all, 

 

I'm struggeling to make a RANKX measure in which I rank sales value of different brands. 

 

In the fictional table below I want to rank Brand by Category ignoring the columns subcategory and subbrand. I tried things like allselected, values, all, summarize columns but nothing gives the right answer. I do not want to use seperate tables per category because the report needs all categories within the same slicer and I need the columns that are ignored. 

 

Any ideas are much appreciated. 

 

CategorySubcategoryBrand SubbrandSales ValueDesired RANKX outcome
FacecareCleansingAngelo Joanna                       7.1001
FacecareCleansingLucie Mandy                       7.4004
FacecareCleansingMarco Hannah                       6.8005
FacecareCleansingMaximilian Udo                       8.5002
FacecareCleansingRoberto Elmar                          8007
FacecareMoisturizingAngelo Heinz-Peter                       9.3001
FacecareMoisturizingLucie Hans-Walter                       1.0004
FacecareMoisturizingMaren Dietrich                       9.1003
FacecareMoisturizingMaximilian Christina                       4.3002
FacecareMoisturizingOtmar Ekkehard                       6.6006
SuncareAftersunAndré Anita                       5.5005
SuncareAftersunMaximilian Michaela                       2.8002
SuncareAftersunKornelia Heiderose                       5.1006
SuncareAftersunNicolas Annegret                          4001
SuncareSPFDorothee Dora                       5.9003
SuncareSPFGabriel Lieselotte                       5.6004
SuncareSPFMaximilian Carola                       3.9002
SuncareSPFMaik Sabine                       1.1008
SuncareSPFNicolas Aloisia                       8.3001
SuncareSPFRose Maja                          4009
SuncareSPFUlli Elsbeth                       2.6007

 

For extra bonus points 😉 : later I want to use the rank outcome to create a measure giving the brand name of the top 5 ranked brands and all other brands to be called "other" which have to go in the rows of a matrix table visual. This might be important for any answer. 

 

Thanks once again!

2 Replies