Skip to content
Apiary

AggregateSubtotalRow

type AggregateSubtotalRow = SubtotalRowBase & object;

A subtotal row aggregating a group of data rows for one level of the row field hierarchy.

optional colSubtotalData?: CellValue[][];

Per-(col-subtotal-entry, data-field) intersection values, indexed as colSubtotalData[colSubtotalIdx][dataFieldIdx]. Each cell aggregates records whose row keys fall in this row’s group AND whose col keys fall in the col subtotal’s group. Populated only when both axes have subtotals and the row-subtotal’s effective aggregation matches the data field’s own.

data: CellValue[][];

Aggregated values, indexed as data[colIndex][dataFieldIndex]. The row dimension is absent because the subtotal aggregates across all rows in its group.

kind: "aggregate";
rowGrandTotal: CellValue[];

Row grand total: rowGrandTotal[dataFieldIndex].

subtotalFunction: PivotSubtotalFunction | "default";

Subtotal function ('default' uses each data field’s own aggregation).