This article discusses how array values can be aggregated at the Product, Portfolio, and Company levels. It also discusses the interaction and processing order between arrays and aggregate variables
Array aggregation is the process of reading results from an array variable in a way that the resulting value is no longer an array itself. This can occur at the product, portfolio, or company levels.
Array Aggregation operators include Sum, Single Value, Average, Median, Minimum, Maximum.
The Single Value operator selects the result from a single array index value and ignores all other array index values.
All other aggregation operators are applied across all array index values that comprise the array variable.
Array Aggregation Interaction with Aggregate Variables
When aggregating array variables from the product to the portfolio, or from the portfolio to the company levels, aggregation is performed first for each array index value, and then the results for each array index value within the variable are aggregated. This is an important order of operations to consider during development.
Array variable results can also be aggregated when referenced, allowing various aggregation options such as sum, average, and median to be applied to the results of all array value results. It is also possible to reference the results of a single array value result. If aggregated, the variable referencing the aggregated results will no longer be an array variable, since the result is converted into a single value.
In the example below, the Cash Flows company variable below sums across all underlying portfolio array variable aggregate names named Cash Flows. The result of this double aggregation will be a single value.