Rank not resetting in multi hierarchy




I am trying to use a rank function in a multi hierarchy list but the rank is not resetting in other hierarchy. I am expecting that the first list member in the hierarchy should start to 1. 



Thanks in advance for the help.






  • @tompatrick.ting 

    What is the definition, or calculation, for the line item "Number"?

    The Group By looks correct but I'm wondering if you need to add the account number to that? It's the dimension you have in your pivot (upper right hand corner).

  • @tompatrick.ting ,


    So, not sure why are you doing the rank in this module with all of the dimensionality, but if you are wanting to reset at the parent the current item, the last parameter should be the parent of the item, so, parent(item(the numbered list)).



  • Hi Tom,


    I had the same requirement recently where in, had to sort to the leaf level of the hierarchical list based on Sales history(Number as per your requirement) from highest to lowest.

    For this i had used the Rank and Rank Cumulate function:


    1.Create a lineitem Rank Number and use RANK(Number, ASCENDING, SEQUENTIAL)  

    2. Create one more lineitem and use formula RANKCUMULATE(Number, Rank Number, DESCENDING)

    Note:- Tweak the formula as per your requirement.


    Hope this helps