Rank function Descending not working

Hi,

 

Please help understand why my rank function is not working when using descending as my direction.

 

Please find attached screenshot. I am expecting to do the ranking by starting to highest rank to rank 1.

tompatrickting_0-1598266844163.png

 

Thanks in advance for helping.

Tom

Tagged:

Comments

  • Hi Tom,

    What is the expected behavior when the values to be ranked are all equal to each other like Code3 in your screenshot?

  • Hi @anirudh,  I am planning to filter 1 if this will be successful to get the last occurrence value in code3.

  • The descending element impacts how larger and smaller numbers are ranked but it is the sequential element of your function impacting the behaviour you mention. Are you always looking to show the final occurrence or just a unique list? If it is the unique option you could try the ISFIRSTOCCURRENCE function, check out the Anapedia page here:  https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/ISFIRSTOCCURRENCE.htm 

     

     

  • @tompatrick.ting 

     

    How about having another module by Code3 (need to create it as a list) where you summarize the number of counts for each Code3 (group), and use that to compare with the Rank result.  You can then use this as filter:

    - when Rank is equal to the group count or

    - transformed Rank i.e initial Rank - group count + 1.  In this case, you always use 1 as filter