Register

Contributor

## PREVIOUS() for line items in a module not involving time dimension

I am working on a module in which have two related line items (L1 & L2)& a dimension "Period."  For Period A is L2=0, Period B L2 = Period A L1 and so on. I am trying to figure out a calculation for the Non-time series module. Example of module given below:

Period A/Period B/Period C/Period D/Period E

L1        13/15/16/18/19

L2         0/13/15/16/18

what is the best way to do it?

6 REPLIES 6
Community Boss

## Re: PREVIOUS() for line items in a module not involving time dimension

Hi,

One way is to build into your period list a "previous" property and fill it with the previous element.

If it's a changing list, you can have that property be filled automatically with a formula searching for text/numbers or rank()

Then you can do L1[LOOKUP:Period.previous]

Nathan Rudman, Anaplan Model Builder
Contributor

## Re: PREVIOUS() for line items in a module not involving time dimension

Hi Nathan

I tried implementing the above in a module but I received the following error

"Data type mismatch: format other than LIST or DATE being referenced as a relation"

I am fairly new to Anaplan and have not been able to figure out this isse.

Community Boss

## Re: PREVIOUS() for line items in a module not involving time dimension

What is the format of the previous property you created in the list ?

Nathan Rudman, Anaplan Model Builder
Contributor

## Re: PREVIOUS() for line items in a module not involving time dimension

Period.Previous is Integers. Period is essential 0 to x. Would that be a problem?

Community Boss

## Re: PREVIOUS() for line items in a module not involving time dimension

Yes, Period.previous should be list fromated as Period and then you can input the value yourself

Nathan Rudman, Anaplan Model Builder
Contributor

## Re: PREVIOUS() for line items in a module not involving time dimension

That worked.

Thank you so much!!