WarUI

First and last aggregators

GRID-A16-F09P1baselinePlanned

The first and last aggregators return the value from the first or last leaf row of a group, in the current sort order. They suit snapshot values such as opening and closing balances.

Planned. This page shows the specification from issue #196. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

Daily balances grouped by Month. Open=first, Close=last, sorted by Date ascending.

Expected behavior

Reversing the sort swaps the first and last results when firstLastOrder=sorted. In source mode the results are unaffected by the sort.

Planned API surface

columns[].aggregate ('first'|'last')options.grouping.firstLastOrder (sorted | source)

Acceptance criteria

  • first returns the value of the first leaf row in the chosen order. (pending)
  • Changing the sort recomputes first and last in sorted mode. (pending)
  • Filtered-out rows are excluded from first and last. (pending)
  • Works with non-numeric values (strings, dates). (pending)