For the complete documentation index, see llms.txt. This page is also available as Markdown.

summarize | bin |dcount |avg | countif

bin

bin() groups values into buckets (bins) of a specified size.

When using bin we should specify 2 params, the column that we want to make buckets of and the timeframe.

DeviceEvents
| summarize count() by bin(Timestamp,1h)

another example:

Guest sign-ins in the past month separated by day


avg()

avg() = calculates the average (mean) value of a column.

Response Time

100

200

300

Result: 200

Example:

if we now add the avg, it will add another field that will display the average maxbytes sent per count.


countif

countif() = counts only the rows where a condition is true.

User
Result

Alice

Failed

Bob

Failed

Charles

Success

David

Success

Returns: 2

Example:

Find the total number of bytes in each hourly bucket, also count records that have value more than 0.

Last updated