Pivot Table Report
A Pivot Table summarizes values across multiple dimensions. Use row groups, optional column groups, and aggregated values to compare data in a table or chart-style rendering.
Configuration
In addition to the basic report properties, configure:
| Property | Description |
|---|---|
| Report Type | Set to PivotTable. |
| Render As | Select Tabular, Group, Stack, or FlatTabular. |
| Show Title | Available for Group and Stack renderings. |
| Chart Title | Names the chart when Show Title is enabled. |
| Orientation | Controls the orientation of Group and Stack renderings. |
| Data Labels | Shows values on Group and Stack renderings. |
| Legend | Controls the legend on Group and Stack renderings. |
CSV and Excel export are not available for the Tabular rendering.
Pivot data structures
- pivotRows: Row group definitions, including
reportAttribute,reportGroupType,aggregateType, andshowInDrillDown. - pivotColumns: Optional column group definitions.
- values: Aggregated value definitions, including
reportAttribute,aggregateType, anddisplayName. - renderAs: Determines whether the result is shown as a table or a chart-style grouping.
Row and column order
- Pivot Rows and Pivot Columns grouped by a picklist follow its option sequence; grouped by State, they follow the lifecycle order.
- Sort By on a value reorders rows only; columns always keep their group order.
- When the report has Pivot Columns and is rendered as a table, Sort By does not apply and rows keep their group order.
See Value Order and Sort By for details.
Example
reportDisplayType: "PivotTable"
renderAs: "Group"
pivotRows: [
{ reportAttribute: { attributeName: "region" }, reportGroupType: "Attribute" }
]
values: [
{ reportAttribute: { attributeName: "sales" }, aggregateType: "Sum" }
]
Tips
- Configure at least one
pivotRowsgroup and onevaluesdefinition. - Use
dateSubGroupon date row groups for monthly or weekly summaries. - Choose Tabular or FlatTabular when users need to inspect grouped values in a table.
- Choose Group or Stack when users need a visual comparison across groups.
Success criteria
The report renders pivot output when pivotRows and values are configured and reportDisplayType is PivotTable.