Top N Grouping Problem

Hi Sam/ Other members,

I have created a dynamic top N grouping following Sam YouTube (Top 10, Next 10 and The Rest).

Everything go fine as shown in Top Customer Analysis.

However, as the model would like to let user choose currency, and when I add the cur to the table, the grouping is not correct (as Top Customer Analysis with currency).

Even I would like to add the ranking to the table, I got the same issue.

Can anyone help for this

Demo.pbix (1.0 MB) ?

Ok yes, this is because of the context of your calculation, especially when it interacts with your RANKX formula.

You have to remember with the below you’re only ranking just on customer.

There’s no inclusion of the ccy here. So you have to integrate it in this part of the formula if you want it to work with the grouping.

What I would do here, is work with this formula by itself first and try to work our how to get the RANKX producing the correct result (if you leave it in just the grouping formula it will be impossible to audit it).

Check out the below for technique on how to use RANKX in more complex ranking scenarios.

See how you go with these tips

Thanks
Sam