Anaplan functions
Syntax, worked examples, the traps, and what to use instead. Written by Nikolai Starostin, Anaplan architect at MaxPlan.
- ANY and ALL in AnaplanANY is TRUE when at least one mapped source cell is TRUE. ALL is TRUE when every mapped cell is. Where nothing is mapped, ALL returns TRUE in Classic and FALSE in Polaris, so guard it.
- CUMULATE vs PREVIOUS in AnaplanBoth give a running total. On a long timeline or a large line item, the Planual prefers PREVIOUS, which adds one value to the last total. CUMULATE is faster on a few years at Year level, and in Classic it is the one that works over a list.
- FINDITEM in AnaplanFINDITEM turns text into a list item by matching the item's name or code. On a blank, Classic still searches the whole list before it returns blank, so check for blanks first when the text can be empty.
- ISFIRSTOCCURRENCE in AnaplanISFIRSTOCCURRENCE is TRUE the first time a value appears in a list, so it is used to count unique values. First means list order, not date. To count members of a list, ANY is usually the better choice.
- MOVINGSUM in AnaplanMOVINGSUM aggregates a line item over a window that moves with each period, such as the last three months. Give both offsets: with only the first, Classic returns one period and Polaris runs to the end of the timeline.
- OFFSET vs LAG vs LEAD in AnaplanAll three read a value from another period. A positive number looks forward in OFFSET and LEAD, and back in LAG. LAG and LEAD can also block zero or negative offsets. For one period, use PREVIOUS or NEXT.
- RANK and RANKCUMULATE in AnaplanRANK gives each item its position by value. RANKCUMULATE gives a running total in that order. RANK sorts descending by default and RANKCUMULATE ascending, so set the direction. In Classic both stop at 50 million cells, and neither runs in parallel.
- SELECT in AnaplanSELECT reads the value of one named list item, version or period. It is fine for versions and a list's top level. For other items, hold the item in a settings line item and use LOOKUP, so the formula survives a change.
- SUM vs LOOKUP in AnaplanUse SUM to add many source cells into one target cell, with the mapping on the source side. Use LOOKUP to fetch one value, with the mapping on the target side. Never put both in one bracket: split them into two line items.
- TEXTLIST in AnaplanTEXTLIST joins text values from a list into one text cell. It comes as a function and as an aggregation, and works only in the Classic engine. Anaplan's Planual says to avoid it where you can, because it needs a lot of memory.
- TIMESUM in AnaplanTIMESUM aggregates a line item over a range of periods and returns one value. Use it in a line item without Time. In a line item with Time, Anaplan repeats the calculation for every period, so use MOVINGSUM or YEARTODATE there.
- YEARTODATE in AnaplanYEARTODATE adds up a number from the start of the year to the current period and starts again each year. It works from Day to Half-Year, but not when the calendar type is Weeks: General.