lastBy
lastBy returns the last row for each group.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| groupByColumns | String... | The column(s) by which to group data.
|
| groupByColumns | ColumnName... | The column(s) by which to group data.
|
| groupByColumns | Collection<String> | The column(s) by which to group data.
|
Returns
A new table containing the last row for each group.
Examples
In this example, lastBy returns the last row of the table.
In this example, lastBy returns the last row, as grouped by X.
In this example, lastBy returns the last row, as grouped by X and Y.