Search

Aggregation Functions

Anaplan's aggregation functions allow you to bring in values from a source line item using one or more mappings. Each mapping is a line item or property with data type specified to be list values from one of the dimensions of the result line item.

Syntax Schema:

Aggregation functions share the same special syntax schema:

  • Result = source[function: mapping1, function: mapping2 ...]

For example, the SUM function:

  • Result = source[SUM: mapping1, SUM: mapping2 ...]

Constraints:

  • The dimensions of the mappings must be the dimensions of the source line item.

List of Aggregation Functions

Here is a full list of the available aggregation functions, the data types with which they can be used, and links to individual pages explaining their usage:

Name Description
x[ALL:y] Boolean data type - Returns TRUE if all items in the list are TRUE.
x[ANY:y] Boolean data type - Returns TRUE if any item in the list is TRUE.
x[AVERAGE:y] Numeric data type - Calculates the average for a specified range of values.
FIRSTNONBLANK Date, time period, list, and text data type - Shows the first non-blank text, list or date cell and uses the mapping to determine where to post the result.
LASTNONBLANK Date, time period, list, and text data type - Shows the last non-blank text, list or date cell and uses the mapping to determine where to post the result.
x[MIN:y] Numeric, date, and time period data type - Returns the minimum value from a line item that meets criteria specified in a second, list-formatted, line item. The line items must share a common dimension.
x[MAX:y] Numeric, date, and time period data type - Returns the maximum value from a line item that meets criteria specified in a second, list-formatted, line item. The line items must share a common dimension.
SUM Numeric data type - Sum the values based on a list-formatted or time period-formatted line item or property in the source that matches a dimension in the target.
x[TEXTLIST:y] Text data type - Combine the individual text cells into a comma-separated list. The mapping determines which items in the source are combined into each cell of the result.