Question on RANKCUMULATE formula
Dear all,
Kindly refer screenshot below. I am experimenting with the RANKCUMULATE formula with two versions shown below, respectively in the columns labelled "Account Counter 1" and "Account Counter 2".
"Account Counter 1" which has the formula RANKCUMULATE(To Change, 1, ASCENDING, TRUE, Country) is working correctly.
"Account Counter 2" has the simpler version of the formula with just RANKCUMULATE(To Change. 1) but it is not working correctly as shown below  the numbers should be running in sequence from 1 to 150 corresponding to the number of rows in the module but is not. Instead we have the first 5 from 1 to 5 in the correct sequence and then it jumps to 41  does anybody know why this is happening?
Kind regards,
Clarence
Best Answers

That is correct.
Therefore, if you change the row order in the grid the sequence will not update accordingly.
I can see that you have applied a sort. If you were to remove this and revert the list back to it original order then the sequence will increase as per your expectations.
You can run an action that will resort the list as per a logic determined in a systems module.
0 
A very simple support calculation module for the redistribution on a lower level with some balancing checks may help. ... but that's all I can tell you. 😉
1
Comments

Hi @ClarenceAndre ,
In the 2nd version of the formula, there is COUNTRY at the 5th place (which is meant for Rank Groups). With the Rank group, you can calculate ranks within that group (in this case COUNTRY). Hence, you see Ranks 1 to 20 for US, and again Ranks starting from 1 for UK.
Hope this helps!
0 
As @Vinay VaradarajM states, the 'Account Counter 1' formula uses the Rank Group function, limiting it within each country group. 'Account Counter 2' has no limits and will just rank it according to appearance in the module. This may be quite difficult to understand in a multidimensional module. To understand the behaviour of RANKCUMULATE, it helps to pivot all lists to the rows, show all parents and remove all sorts. I think then it may become more clear what it is doing.
More info can be found here
0 
Many thanks both @PhilippErkinger @Vinay VaradarajM for explaining why RANKCUMULATE(To Change,1) is not behaving the way as one would expect  what would then be the correct arguments to use to get the correct sequence from 1 to N where N is the number of rows in the module?
Thanks and regards,
Clarence
0 
@ClarenceAndre That's a bit tricky, because it fully depends on the dimensions used in the module and their natural order in the list. It may help to have a support module or try different scenarios with ranking groups.
Is this from the L3 course? The module seems familiar.
0 
Is this view filtered in any way?
The view has been sorted so the view is different to the actual order of the list items in General Lists.
That is why they are not in numerical order.
Undo the sort.
0 
Hi Philipp it is indeed from L3 🙂0

Hi @ChrisAHeathcote @PhilippErkinger @Vinay VaradarajM
With reference to the RANKCUMULATE formula in Account Counter 2, my bad. Think I found out why its coming up this way e.g. 1 to 5, 41 to 45 etc. is because the way its coded in the A1 Account list so the formula is probably working correctly, not as expected but correct. The sequence follows the code in the list rather than row order.
Kind regards,
Clarence
0 
@ClarenceAndre then I wonder what you want to achieve with the rankcumulate in this module? You may think too complex, the solution may be simple.... just a small hint. 😎
0 
Completely agree. I might been overcomplicating the situation.
What I'm trying to come up with is a method to locate the Redistribution Ratio shown in the screenshot below. I am able to calculate the Redistribution Ratio for the country (bordered in green) but the question is how do I move that to the next column to complete the calculation needed?
Which is when I started thinking about RANKCUMULATE to come up with the index needed to locate the cell required. Any ideas of what I should be thinking if I'm missing the point?
Kind regards,
Clarence
0 
Hi @ChrisAHeathcote yes you're right if I uncheck the sort I can see the numbers in the correct sequence! I'll check off your reply as the solution to the question.
Kind regards,
Clarence
0 
Thanks Philipp, let me give some thought to that approach. Best regards, Clarence.0