For the complete documentation index, see llms.txt. This page is also available as Markdown.

AX - Pivot Table

Overview

AX - Pivot Table is a Lightning App Builder component that displays summarized data from your Salesforce records in a cross-tabular format with row and column groupings on record pages, app pages, and home pages.

Use it to analyze data across multiple dimensions—like revenue by region and product, cases by status and priority, or opportunities by stage and owner. The component automatically calculates subtotals and grand totals, giving users a spreadsheet-like analysis view without exporting data.

Perfect for sales performance analysis, support metrics breakdowns, financial summaries, or any scenario where users need to slice data multiple ways to spot trends and patterns.

Getting Started

Use this simple tutorial to learn the basics of the Pivot Table component and start building your use cases.

spinner

Key features

  • Data Integration: Retrieves records from any Salesforce object and summarizes them in a pivot table.

  • Flexible Grouping: Group records into rows and columns using one or more field API names.

  • Aggregation: Apply multiple aggregation functions (SUM, COUNT, AVG, and more) to the grouped data.

  • Totals: Show a grand total row/column and per-group subtotals.

  • Display Options: Stack aggregation values within each cell, or lay them out side by side.

  • Customization: Add a header with title, caption, and icon, and expand to full screen for detailed analysis.

Use Cases

  • Opportunity Page: Show revenue by region and sales rep.

  • Account Page: Display open cases by priority and team.

  • Campaign Page: Present leads by source and status.

  • Sales Dashboard: Summarize deals by stage and owner.

  • Service Management Overview: Track resolution time by category and channel.

  • Marketing Overview: Analyze conversion rates by campaign and region.


Configuration

Add the Pivot Table component to a Lightning page in App Builder, then configure it in the Properties Panel.

Properties

Label
Type
Default
Required
Description

Object Api Name

String

Yes

API name of the Salesforce object used to retrieve records.

Filter

String

SOQL WHERE clause used to filter which records are shown as tags. Example: Status = 'Active' or Type__c = 'Premium'.

Group Row Fields

String

Yes

Comma-separated list of field API names used to group records into rows of the pivot table.

Group Column Fields

String

Comma-separated list of field API names used to group records into columns of the pivot table.

Aggregation Fields

String

List of aggregation functions to apply to the grouped records. Example: SUM(Amount), COUNT(Id), AVG(Score__c). Multiple aggregations are supported.

Show Grand Total

Boolean

If true, displays a grand total row and column summarizing all data in the pivot table.

Show Subtotals

Boolean

false

If true, displays subtotal rows and/or columns for each group to help users interpret grouped data more easily.

Stacked Summaries

Boolean

false

If true, displays aggregation values stacked vertically within each pivot table cell instead of placing them side by side.

Header - Title

String

Text displayed as the main title in the component's header. Example: “Open Opportunities” or “Top Accounts.”

Header - Caption

String

Subheading text displayed below the header title to provide extra context. Example: “Sorted by Stage” or “Filtered by Priority.”

Header - Icon Name

String

The Lightning Design System name of the icon (e.g.,…

Action - Full Screen

Boolean

false

If true, displays a button that allows users to expand the data table to full screen, improving visibility for large datasets or detailed analysis.

Use Case Examples

Example 1: Display an Account's cases by priority and owner

spinner

Scenario: For a given account, summarize open case by priority and support representative to get a clear view on current case assignment and workload.

Steps

1

Edit your Account record page

2

Drag the AX - Pivot Table component onto your page layout

3

Set Up Data Source

  • Set Object Api Name to Case (pulls data from Case records)

  • Set Filter to AccountId = {{Record.Id}} (display only cases related to the current account)

4

Configure the Pivot Structure

  • Set Group Row Fields to Priority (creates rows for each Priority picklist value - High, Medium, Low etc.)

  • Set Group Column Fields to Owner.Name (creates columns for each sales rep)

  • Set Aggregation Fields to COUNT(Id) (counts the number of case records)

5

Configure Display Options

  • Check Show Grand Total to display total number of cases

6

Customize Header

  • Set Header Title to {{Record.Name}}'s cases

  • Set Header Icon Name to standard:case

7

Save and test the pivot table functionality

Example 2: Display and Account's opportunity pipeline

spinner

Scenario: Display and Account pipeline with amount and stages.

Steps

1

Edit your Account record page

2

Drag the AX - Pivot Table component onto your page layout

3

Set Up Data Source

  • Set Object Api Name to Opportunity (pulls data from Opportunity records)

  • Set Filter to AccountId = {{Record.Id}} (display only Opportunities related to the current account)

4

Configure the Pivot Structure

  • Set Group Row Fields to StageName (creates rows for each Stage)

  • Set Group Column Fields to Type (creates columns for each opportunity type)

  • Set Aggregation Fields to SUM(Amount) (adds up the dollar amounts for each stage/Type combination)

5

Configure Display Options

  • Check Show Grand Total to display total revenue

  • Check Show Subtotals to display revenue per row

6

Customize Header

  • Set Header Title to {{Record.Name}}'s pipeline

  • Set Header Icon Name to standard:opportunity

7

Save and test the pivot table functionality

Example 3: Sales Revenue by Region on your Home Page

Scenario: Create a comprehensive revenue analysis showing sales performance broken down by region and sales owner, enabling managers to identify top performers and regional trends.

Prerequisites: This example requires custom field setup on the Opportunity object:

  • Region__c: A custom picklist or text field containing region values (e.g., "West", "East", "Central", "North", "South"). This field must be populated on your Opportunity records to enable regional grouping.

  • Proper data: Opportunities should have assigned owners (OwnerId) and varied stage names for effective analysis

Steps

1

Edit your Home record page

2

Drag the AX - Pivot Table component onto your page layout

3

Set Up Data Source

  • Set Object Api Name to Opportunity (pulls data from Opportunity records)

  • Set Filter to StageName != 'Closed Lost' (excludes lost deals to focus on active and won opportunities)

4

Configure the Pivot Structure

  • Set Group Row Fields to Region__c (creates rows for each region - West, East, Central, etc.)

  • Set Group Column Fields to Owner.Name (creates columns for each sales rep)

  • Set Aggregation Fields to SUM(Amount) (adds up the dollar amounts for each region/owner combination)

5

Configure Display Options

  • Check Show Grand Total to display total revenue across all regions and owners

6

Save and test the pivot table functionality

What Users See: A table where each row represents a region, each column represents a sales owner, and each cell shows the total opportunity value for that region-owner combination. The grand total appears at the bottom and right edges.

Business Value: Sales managers can instantly see which regions are performing best, which sales reps are excelling in specific territories, and overall revenue distribution without running separate reports


Key Considerations

  • Data Source: Use Filter to limit records; ensure Aggregation Fields are numeric.

  • Grouping: Balance Group Row Fields and Group Column Fields to avoid overcrowding.

  • Performance: Keep Filter selective and avoid grouping on high-cardinality fields for large datasets.

  • Accessibility: Ensure text is readable; test with screen readers.

  • Limitations: No drill-downs; respects sharing/FLS rules.


Troubleshooting Common Issues

  • No Data Displayed: Check Object Api Name and Filter syntax; verify field permissions.

  • Wrong Totals: Ensure Aggregation Fields matches the field type (e.g., Number for SUM).

  • If Issues Persist: Contact our support team at [email protected] for assistance.

Last updated

Was this helpful?