Skip to main content

pivot_table

Pivot Report (PivotTable) — User Guide

What it is

- Pivot Reports support multi-dimensional aggregation: pivotRows, pivotColumns, values, and rendering styles (Tabular, Group, Stack, FlatTabular).

Required configuration fields

- Name
- Display Name
- Data Source
- Report Type: "PivotTable"
- Valid For
- Definition
- Precision
- Grand Totals
- Render As: "Tabular", "Group", "Stack", or "FlatTabular"
- Show Title (for Group & Stack)
- Chart Title (for Group & Stack, if Show Title = true)
- Orientation (for Group & Stack)
- Export To CSV (not for Tabular renderAs)
- Export To Excel (not for Tabular renderAs)
- Data Labels (Group & Stack only)
- Legend (Group & Stack only)
- Show State Filter
- Show Parent Filter
- Show Attribute Filter

Key sub-structures

- pivotRows: array of row group definitions { reportAttribute, reportGroupType, aggregateType, showInDrillDown }
- pivotColumns: array of column group definitions (optional)
- values: array of aggregated value definitions { reportAttribute, aggregateType, displayName }
- renderAs affects how the UI shows the pivot: Tabular gives a flattened table; Group/Stack show chart-like renderings.

Example JSON-ish snippet

- reportDisplayType: "PivotTable"
- renderAs: "Group"
- pivotRows: [ { reportAttribute: { attributeName: "region" }, reportGroupType: "Attribute" } ]
- values: [ { reportAttribute: { attributeName: "sales" }, aggregateType: "Sum" } ]

Tips & gotchas

- When renderAs="Tabular" avoid Export To CSV restrictions; Tabular exports are supported differently.
- Ensure pivotRows and values are present; otherwise the renderer may show a configuration error.
- Use dateSubGroup on date pivotRows for monthly/weekly grouping.

Success criteria

- Renderer shows pivot output when pivotRows and values are configured and reportDisplayType is "PivotTable".