sum
The sum
aggregation function calculates the sum of Expression across the group.
Use this function with the summarize
, eventstats
, and timestats
operators.
Syntax
sum( Expression )
Arguments
- Expression: Expression used for aggregation calculation. Wildcards are not supported for field names.
Results
Returns the sum value of Expression across the group.
Example
This example returns the total number of deaths by state.
dataset=myDataset
| summarize EventCount=count(), TotalDeathCases = sum(DeathsDirect) by State
| sort by TotalDeathCases