I have been working on this formula for quite a while now, I hope you can give me an idea on how to do this. I will explain it as much as I can since I cannot provide a screenshot of the actual report from the client.
I have 2 tables with Line Item and Time Dimension. "Value 1" row has the value, "Identifier" row , and "Target Result" row is the target module.
so the formula is that IF Identifier is greater than 1 then I need to add the values from previous months. In the Target Result row, May 2013 has the value of 50 because the condition should add values from Jan 13 until Apr 13 which results to 50. Same thing with Jun 13 since Identifier is 1 it will add values from Jan 13 to May 13 and so on. It means the formula is moving as the months progress.
I hope you can give me an idea on the approach as to how to do this.
For best practices, whenever you use a conditional you always want to have the most likely outcome first. So, if you anticipate the "1" will show up early in the year, then set your IF statement to check for the 1 first. This allows Anaplan to stop processing the IF statement early once it become satisifed.
Depending on what conditions your using to calculate a 1 or 0 you might even consider putting that in the IF statement. That way you won't even need the "identifier" line item.
If it's a complicated identifier, but only uses a subset of the dimensions in your module, then you'll want to create a Boolean in a system module. this is a little advanced but its how we optimize modules for performance.
If you have more details about what you're doing, I'm sure we'd all be happy to help you get you the most efficient formula possible.
As mentioned in the PLANUAL rule no (2.02-10 ), " For long timescales, using PREVIOUS is faster than CUMULATE due to the number of "reads" required for the calculation" and where the number of periods is small, Cumulate is faster.