array_sum()
Calculates the sum of elements in a dynamic array.
Syntax
array_sum
(array)
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
array | dynamic |
✔️ | The array to sum. |
Returns
Returns a 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
This following example shows the sum of an array.
print arr=dynamic([1,2,3,4])
| extend arr_sum=array_sum(arr)
Output
arr | arr_sum |
---|---|
[1,2,3,4] | 10 |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for