Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Calculates the variance of expr in records for which predicate evaluates to true
.
Null values are ignored and don't factor into the calculation.
Note
This function is used in conjunction with the summarize operator.
varianceif(
expr,
predicate)
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
expr | string |
✔️ | The expression to use for the variance calculation. |
predicate | string |
✔️ | If predicate evaluates to true , the expr calculated value will be added to the variance. |
Returns the variance value of expr in records for which predicate evaluates to true
.
range x from 1 to 100 step 1
| summarize varianceif(x, x%2 == 0)
Output
varianceif_x |
---|
850 |