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
XLBob
Resolver II
Resolver II

RANKX

I have sales data at monthly level and you can find it on my onedrive. The file name is "sample" and below is the link.
https://onedrive.live.com/?id=7DF5E31C1 ... 1C189063EC

How do I add a calculated column to rank each category for the same month and channel? For example, rank all category for the month of Nov 2015 in channel CH4.
Then for each category I want to rank the subcategory and keep the top 5 as it is and combine the rest into a new subcategory called "other". For example, in Nov 2015 and channel CH4, category with ranking 2 has x (x>10)subcategories, rank these subcategories and for the subcategory with ranking from 6 to x combine them into a new subcategory called "other'.

Due to the merge as mentioned above I guess it has to be done with calculated columns instead of measures

Thanks for your help.

1 ACCEPTED SOLUTION
kazlik
Helper II
Helper II

1 REPLY 1
kazlik
Helper II
Helper II

There are some examples in this post that might help you,

http://www.powerpivotpro.com/2015/06/rankx-apalooza-within-and-across-groups-with-filters-etc/

 

 

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.