RANK within Multiple Hierarchies

Frequent Contributor

RANK within Multiple Hierarchies



I'm trying to use the RANK function within a Module with multiple dimensions with hierarchies.


As explained in Group option in RANK Function by @DavidSmith I've created a Group By list but however when you're on a parent in a hierarchy this 'Group By' line item will result into blank. Changing the summary method to Formula should do the trick, but however Anaplan does not allow for this.


Any suggestions or help with this is greatly appreciated!





I understand in concept what you are doing. I need to do something similar with two lists, one that has 6 level and one that has 4. I am creating the SYS module for the L6 (Segment) list. I have set things up as you have documented but I can't get the Segment L6 value line item to behave as your P3 Value line item. I am getting a value of 6 if the Segment is at the base-level and a value of 1 at all other levels.

I can't get my head wrapped around how Denominator is even being used in this formula since there is no reference to it in the formula for any of the "value" line items. What needs to be done to have the Ratio utilize the Denominator line item?






Nevermind, I figured it out.
I haven't used the "Ratio" summary method much and I see where you set the formula for the Ratio Calculation.

Occasional Contributor

Dear Jared, 

many thanks for such a brilliant solution! i have used the method and it seems to work properly)


but it would be great to have the RANK function with the option to rank each hierarchy level automatically some day, i think.

may be some day the RANK will get the sixth argument...




Certified Master Anaplanner

Hey @JaredDolich,

Have you found a way to rank values independent of time (in a module using Time as a dimension)? Some models from the App Hub use custom time as a workaround, but I'm curious if there's a way to rank values across all time periods.


Great question @DavidEdwards 

I have to admit, I'm stumped on this one. Rank appears to disregard the group by when the time period changes. Meaning it resets, even if I use all time period. I even tried using a TRUE boolean. I'm surprised I never noticed this.

Give me some time to research this - love puzzles.


Jared Dolich