Average

Syntax

	average($num1, ..., $numN)

$set.average()

Description

Calculates the average value of all given values. All values must be numbers. The function can be called either with multiple arguments or with a set or list of numbers as arguments. null values are filtered out and have no influence on the result.

Parameters

Name Type Description Mandatory Default
number Number A number to be included in the calculation of the average. One of them must be defined.
set Set A set of numbers to include in the calculation of the average.

Return value

Type: Number

The average of the specified numbers.

Examples

Simple average

	average(1, 2, 3, 4)

Output: 2,5

Average with a list

	list(1, 2, 3, 4).average()

Output: 2,5

Average with null

	list(1, 2, 3, 4, null).average()

Output: 2,5