Hi All,
We have a requirement to sequence items in a export and we've been using the RANK function to achieve that in a similar way that is listed in several posts in the community (example: https://community.anaplan.com/t5/Anaplan-Platform-Discussions/COUNTIF-How-to-add-sequence-numbers-wi...)
However, when applying the simplest version of the formula as in "RANK ( 1 , DESCENDING , SEQUENTIAL )" to a module I'm not getting the sequence as normally displayed for a specific list, but some order which might be related to the creation order.
When I export the information from an Anaplan unfiltered view the result of this formula I get the result below:
Given the above I'd like to clarify the following:
- Is the SEQUENTIAL in the ORDER function related to a display order or to some internal index in the list? If it is to the display order what could be wrong with the simple logic/extraction above?
- If SEQUENTIAL is not about display sequence, what would be a reasonable way to get this sequencing in the line items as per display and not per internal index?I was considering creating a property or property module just to maintain an extra field with the sequencing I want, but I'd expect there is some way to expose that.
Let me know if something is unclear.
Cheers,
Solved! Go to Solution.
Looks like the ranking is done across your SKU PARENT level. If your expectation is to produce a ranking within each SKU PARENT, you could use RANK ( 1 , DESCENDING , SEQUENTIAL, TRUE, SKU PARENT ) where SKU PARENT is a line item formatted as SKU PARENT list and with a formula parent(item(SKU)). Alternatively you could pull the parent property from a module dimension-ed with SKU level. Hope this helps.
Hi Arun,
I think I understand your answer, but that's not what I am looking for. As per my understanding below is a comparative of what is currently happening vs. what you proposed vs. what I am after
CURRENT | PROPOSED | DESIRED | |
SKU 1 | 1 | 1 | 1 |
SKU 2 | 2 | 2 | 2 |
SKU 3 | 3 | 3 | 3 |
SKU 4 | 4 | 4 | 4 |
SKU 5 | 5 | 5 | 5 |
SKU 6 | 6 | 6 | 6 |
SKU 7 | 7 | 7 | 7 |
SKU 8 | 8 | 8 | 8 |
SKU 9 | 9 | 9 | 9 |
SKU 10 | 10 | 10 | 10 |
SKU 11 | 11 | 11 | 11 |
SKU 12 | 12 | 12 | 12 |
SKU 13 | 13 | 13 | 13 |
SKU 14 | 14 | 14 | 14 |
SKU 15 | 15 | 15 | 15 |
SKU 16 | 16 | 16 | 16 |
SKU 17 | 17 | 17 | 17 |
SKU 18 | 18 | 18 | 18 |
SKU 19 | 19 | 19 | 19 |
SKU 20 | 20 | 20 | 20 |
SKU 21 | 21 | 21 | 21 |
SKU 22 | 22 | 22 | 22 |
SKU 23 | 23 | 23 | 23 |
SKU 24 | 24 | 24 | 24 |
SKU 25 | 25 | 25 | 25 |
SKU 26 | 26 | 26 | 26 |
SKU 27 | 27 | 27 | 27 |
SKU 28 | 76 | 28 | 28 |
SKU 29 | 77 | 29 | 29 |
SKU 30 | 85 | 30 | 30 |
SKU PARENT 1 | |||
SKU 31 | 28 | 1 | 31 |
SKU 32 | 29 | 2 | 32 |
SKU 33 | 30 | 3 | 33 |
SKU 34 | 31 | 4 | 34 |
SKU 35 | 32 | 5 | 35 |
SKU 36 | 81 | 6 | 36 |
Let me know if I misunderstood.
Regards,
I understand your requirement now.
SEQUENTIAL is not giving us the display sequence, it is the order of creation of the list item itself i believe.
I think you can achieve this by a workaround process. Just a thinking, try it out.
Create a rank @ SKU level. Have the summary as MAX
Create a rank @ SKU_PARENT level.
Create a module by SKU Parent, create a lineitem as MAX RANK - get the summary of rank @ SKU level
Final rank = rank @ SKU + MAXRANK[lookup for the parent having rank-1]
Be mindful of the limitations on RANK and its performance impact.
That looks more promising than what I've been trying so far. That or creating an ad-hoc export list.
Thanks! Will give it a go between today and tomorrow and let you know the outcome.
Hi Arun,
For curiosity, I did some further tests on this and if you reorder some items they do get reindexed so the SEQUENTIAL concepts is certainly not displaying a pure creation order either.
In any case, inspired on your approach I managed to find solution that seems to do the trick in a single module.
1. Create an "ORIGINAL ORDER" item with simplest version of the formula RANK(1,DESCENDING,SEQUENTIAL)
2. Apply to "ORIGINAL ORDER" the summary=formula (so that parents are also ordered between themselves)
3.Create a JOINT ORDERformula which is PARENT ORDER+ ORIGINAL ORDER/100
4.Create a FINAL ORDER with RANK(JOINT ORDER, ASCENDING, SEQUENTIAL)
Based on my findings so far, that looks to be always be valid for any hierarchy with two levels plus a total parent and it seems also feasible to expand for 3 or more levels.
Thanks for the help.