Computes the average of all numeric values found in input array. Input can be an array literal, a column of arrays, or a function returning an array. Input values must be of Integer or Decimal type.

When this function is invoked, all of the values in the input array are passed to the corresponding columnar function. Some restrictions may apply. See AVERAGE Function.

Literal example:

derive type:single value:LISTAVERAGE([0,0,2,4,6,8,10,12,14,16,18,20]) as:'myArrayAvg'

Output: Generates an output column containing the average of all values in the literal array: 19.1667.

Column example:

derive type:single value:LISTAVERAGE(myArray) as:'myArrayAvg'

Output: Generates an output column containing the average of all values in the arrays of the myArray column.

derive type:single value:LISTAVERAGE(array_ref)

ArgumentRequired?Data TypeDescription
array_refYArrayArray literal, reference to column containing arrays, or function returning an array


Reference to an array can be an array literal, function returning an array, or a single column containing arrays.

Required?Data TypeExample Value



Example - Math functions for lists (arrays)