Creating a running sequence of numbers in Anaplan

ClarenceAndre
Regular Contributor

Creating a running sequence of numbers in Anaplan

Hi,

Am wondering if there's a way to create a running sequence of numbers in Anaplan.

Am trying to create a sequence of numbers that run from 1 to N in columns such that 1 is in col 1, 2 in col 2 ... N in col N.

Reason am doing this is to see if there is a way to copy a certain cell value (say a number) from the left most column (col 1) to the right most column (col N). This can be done with say OFFSET or LAG but that will need to reference an offset value hence the running sequence.

This would be easy in Excel and am wondering how we do this in Anaplan. I have checked the formulas but do not see a formula that does this.

Any guidance would be most appreciated.

Kind regards,

Clarence

13 REPLIES 13
ChrisAHeathcote
Community Boss

@ClarenceAndre 

ChrisHeathcote_0-1617206645740.png

The count would start from the first period of the time frame whether its months or weeks.

 

Chris
HeathcoteAndHerran.com
ClarenceAndre
Regular Contributor

Perfect! Thanks @ChrisAHeathcote 

ChrisAHeathcote
Community Boss

To specify an end and start then you need to create a separate module where you state the start time period and the number of columns to be numbered.

Therefore, create a new module containing no dimensions and add two line items; Start period (Time period format ) and Number ( Number format )

 

Update the Count Reference to include a nested IF THEN ELSE.

 

=IF ITEM(Time) = NewModule.Start Period AND PREVIOUS(Previous Running Count) + 1<=NewModule.Number THEN PREVIOUS(Previous Running Count) + 1 ELSE 0

 

This should ensure that the running count only starts where the user specifies and only continues to the specified number of time periods into the future.

 

Chris
HeathcoteAndHerran.com
ClarenceAndre
Regular Contributor

Thanks so much Chris!