Time: PREVIOUS vs ITEM(TIME) - 1
Hi all,
What's your opinion, should I ever use PREVIOUS(ITEM(TIME)) function when ITEM(TIME) - 1 does the same thing?
Best Practice says it's not recomended to use PREVIOUS() due to low performance.
In the example above it is probably straightforward "yes" to ITEM(TIME) - 1 approach. But what about when there is some "numbered value" and you have to choose between:
- PREVIOUS(NUMBEREDVALUE)
OR
- combination of having ITEM(TIME) - 1 and NUMBEREDVALUE[LOOKUP:'ITEM - 1'] ??
Let me know your thoughts.
Cheers!
Answers
-
On SYS modules I think it wouldn't make much of a difference although I don't have stats to back that up.
PREVIOUS has a very unique use case which is that you can refer the same line item in order to get the results. Now if you want to compare the performance between LOOKUP and PREVIOUS I think there were some stats shared by David Smith and I think PREVIOUS was doing better than LOOKUP. (I think)
Note: I wasn't able to search that thread for you
Misbah
0 -
@KirillKuznetsov That's a great question. I guess for the scenario which you are looking for, PREVIOUS would work better when you need to refer to a numbered value around Time as I guess PREVIOUS has been designed to work best for Time. These are my thoughts and would like to hear from other experts too.
AB
0 -
@Misbah Looks like you are looking for this link: https://community.anaplan.com/t5/Anaplan-Platform/Performance-Comparison-OFFSET-LAG-PREVIOUS-LOOKUP/m-p/51140#M7603
@KirillKuznetsov Hope above performance comparison can provide the details you are looking for.
AB
2