array_sum()
Calculates the sum of elements in a dynamic array.
Syntax
array_sum(array)
Arguments
- array: Input array.
Returns
Double type value with the sum of the elements of the array.
Note
If the array contains elements of non-numeric types, the result is null.
Example
print arr=dynamic([1,2,3,4])
| extend arr_sum=array_sum(arr)
arr |
arr_sum |
|---|---|
| [1,2,3,4] | 10 |