WarUI

Value Zone and Aggregation Functions

GRID-A18-F04P0baselinePlanned

Fields in the value zone are aggregated with a chosen function. Built-in functions are sum, count, distinct count, average, min, max, first and last. Custom aggregation functions can be registered. One field can appear more than once with different functions.

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

Live example

Row zone: Region. Value zone: sum of Revenue and count of Order Id.

Expected behavior

Each value entry produces its own result column. Changing the function updates the numbers right away. The custom median appears in the dropdown once registered.

Planned API surface

pivot.valuesvalue.fieldvalue.aggFuncvalue.labelregisterAggFunc()value.valueFormatteronPivotValuesChange

Acceptance criteria

  • Built-in functions match reference values computed independently in the tests. (pending)
  • Average is computed from the underlying leaf rows, not as an average of averages. (pending)
  • Custom functions receive the leaf values and the group context, and their return value is rendered. (pending)
  • Duplicate field and function pairs are allowed only with distinct labels. (pending)
  • valueFormatter changes display only, not the raw values exposed via the API. (pending)