Planual Explained - Day 20
"Rule 2.02-10": Article 2, Chapter 2, and Rule 10 – “Using PREVIOUS vs CUMULATE”. “For long timescales, using PREVIOUS is faster than CUMULATE due to the number of "reads" required for the calculation. So, the expression should be: 'Calc line item' = 'data line item' + PREVIOUS('Calc line item') rather than CUMULATE('data line item').. It goes against PERFORMANCE elements of PLANS if you wish to go against this rule
Here is how it was done in Pre Planual Era: In order to aggregate the data across the timescale we used to use CUMULATE function to do so. Here the timescale is weekly, multiple years
What is wrong with this method? CUMULATE impacts the performance due to the number of “reads” required. It gets worse when the timescale is
Exception 2.02-10a Short Timescales: You should use CUMULATE only when the timescale is small. Peferably a Monthly Time Period of 1-2 Years
Here is how it should be done in Planual Way: You can get the same result by using PREVIOUS instead of CUMULATE.
Note: PREVIOUS works only on Time Periods and doesn’t work on Lists whereas CUMULATE works on both.
When using CUMULATE over a list—this is when using the format CUMULATE (x, y, z)—the performance can be poor with anything that exceeds a few million cells. This is because the function is running on a single CPU thread, which differs from nearly all Anaplan functions. Anaplan gets its efficiency from high levels of concurrent multithreading on the CPU, which is where a calculation is broken down into many smaller tasks that can run in parallel, so it can run much faster.
Here’s a simple example to illustrate.
Fig. A shows a 10-second calculation running on a single thread.
Fig. B shows the same calculation split into 10 smaller tasks, so it only takes one second to run. Anaplan servers can use over 100 threads to improve efficiency like this.
For more Information please click to Read
I found this illustration helpful in visualizing Reads and Waves5
A picture is worth a thousand words. Thanks for sharing.1