Pivot Table Component

One pivot table. Lightning pages, Screen Flows, and your own code.

Group any Salesforce object down the rows and across the columns, aggregate what sits in the middle, and let people open a cell to see the records behind the number.

6
aggregation functions
Any
Salesforce object
0
lines of Apex
Avonni Pivot Table in Salesforce: closed won revenue aggregated by region down the rows and quarter across the columns, with subtotals and a grand total
The pivot itself

Two axes, two measures, and the records underneath

Group down the rows, group across the columns, put more than one measure in the body, then select a cell to read the records that produced the number.

Six ways to aggregate
Sum, average, count, count distinct, min and max, chosen field by field. One pivot can sum an amount and count the records side by side, as above.
Subtotals, grand total, stacked summaries
Subtotals become available as soon as you group by more than one field, and summaries can stack in the same row instead of spreading across it.
Select a cell, edit the record
Detail rows reveal the records behind an aggregate, with inline editing and row actions, so a number that looks wrong gets fixed in place.
Where it runs

Three surfaces, one configuration

The pivot table ships for Lightning pages, Screen Flows and your own Lightning Web Components. It is the one Avonni component that does not yet run inside Experience Cloud sites.

Lightning pages

On a record or app page

Build it in the Component Builder: pick the fields that group the rows, the fields that group the columns, and the measure that fills the cells. Drop the result anywhere the App Builder accepts a component.

Dynamic Components
Screen Flows

Inside a guided process

Put a summary in front of someone at the moment they have to decide something, on the screen where the decision happens, instead of sending them to a report and hoping they come back.

Flow Screen Components
Your own code

As a Lightning Web Component

The data driven pivot builds the aggregate query from your mapping, runs it, and feeds the pre-aggregated rows to the table. You skip the part where you hand write a GROUP BY CUBE.

LWC Components
What teams build with it

Three questions that stop being a report request

Pipeline by owner and by stage

The number every forecast call opens with, on the page the team already has open, refreshed the moment an opportunity moves.

Case volume by product and by month

Group down by product, across by month, count the cases. Open a cell that looks wrong and read the actual records behind it.

Spend by account and by category

Sum, average and count distinct on the same view, with subtotals per account and a grand total that nobody has to add up by hand.

In a real org

Pivot Table, configured for one job.

All use cases
Live in the Playground

The Pivot Table, in 10+ live examples.

Real screens built with Avonni, one industry job each. Open one to see it run and copy its code, or try the Pivot Table on its own and change any property live.

Try the Pivot Table live →

Aggregation belongs in the query, not in the browser

Salesforce reports do this job well, and they do it in the report tab. What changes is that the pivot sits inside the page or the flow where people already are, and the totals are computed server side before anything renders, so a large object does not turn into a slow page.

Browse the component library
2
grouping axes, rows and columns, with as many fields as you need on each
3
filter menu layouts: horizontal, popover or panel
1
aggregate query, run before the first cell is drawn
Questions

Before you install it

How is this different from a Salesforce report?
A report lives in the report tab and you send people to it. This is a component you place on the page, the record or the flow screen where the work already happens, configured by you rather than by whoever owns the report folder.
Which aggregations are available?
Sum, average, count, count distinct, minimum and maximum. You pick the measure per field, so one pivot can sum an amount and count distinct an owner at the same time.
Can people see the records behind a number?
Yes. Turn on detail rows and clicking a cell reveals the underlying records, with optional inline editing and per row actions, so a number that looks wrong can be investigated and fixed in place.
Will it slow down a page on a large object?
The records are aggregated server side with a single grouped query before they reach the browser. The page receives totals, not thousands of raw rows to add up on the client.
Does it work in Experience Cloud?
Not today. The pivot table ships for Lightning pages, Screen Flows and LWC. For a portal, the Data Table covers most of what teams reach for.

Other components

See where another component runs, and how it is configured.

Stop exporting to answer the same question

Install the package, point a pivot at one object and put the answer on the page where the question keeps getting asked.