Collection extensions

average

collectionstandard futureprog, computer function, computer program

Syntax

@CollectionVariable.average(ItemVariableName, InnerFunction)
Returns
Number
Available in
standard futureprog, computer function, computer program
The AVERAGE function runs the inner function (which itself returns a number) over all elements of the collection, and then returns the numerical average (mean) of the results. Will return 0 if the collection is empty. Note: If the collection itself is a collection of numbers, you can use the pattern .Average(x, @x)