row_number
Returns the current row number in the serialized row set.
Syntax
row_number()Returns: long
Examples
Example 1
datatable(weapon:string)[
"axe",
"sword",
"axe",
"spear",
"sword",
"axe"
]
| summarize count() by weapon
| extend r = row_number()| weapon (string) | count_ (long) | r (long) |
|---|---|---|
| axe | 3 | 1 |
| spear | 1 | 3 |
| sword | 2 | 2 |
row_cumsum
Calculates the cumulative sum of a column in a serialized row set. An optional restart argument resets the running sum to the current row's value when true. A row set is serialized by the sort, top, top-hitters, or serialize operators; order-preserving operators (extend, project, where, ...) keep that property. Only valid in a serialized context.
row_rank_dense
Returns the dense rank of a column in a serialized row set: the rank starts at 1 and increments by 1 each time the column value changes, with no gaps. An optional restart argument resets the rank to 1 when true. A row set is serialized by the sort, top, top-hitters, or serialize operators; order-preserving operators (extend, project, where, ...) keep that property. Only valid in a serialized context.