sum($num1, ..., $numN)
$set.sum()
Calculates the sum of the given values. All values must be numbers.
The function can be called either with multiple arguments or with a list or set as a single argument. null values are filtered out and have no influence on the result.
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| num | Number | The numbers that should be added together. | One of them must be defined. | |
| set | Set | A set or list of numbers to add together. |
Type: Number
The sum of the specified elements.
sum(5, 10, 20)
Output: 35
list(1, 2, 3, 4).sum()
Output: 10
list(1, null, 2, null, 3, 4).sum()
Output: 10
The null values are filtered out.