sumif() (aggregation function)
Returns the sum of Expr in records for which Predicate evaluates to
- Can be used only in context of aggregation inside summarize
You can also use the sum() function, which sums rows without predicate expression.
- Expr: expression for aggregation calculation.
- Predicate: predicate that, if true, the Expr's calculated value will be added to the sum.
The sum value of Expr for which Predicate evaluates to
let T = datatable(name:string, day_of_birth:long) [ "John", 9, "Paul", 18, "George", 25, "Ringo", 7 ]; T | summarize sumif(day_of_birth, strlen(name) > 4)