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

Summarize Pipeline by Stage and Quarter

Build a pivot table of this year's opportunities, stages down the side and quarters across the top, so a manager reads pipeline without running a report.

Every Monday, a sales manager asks the same question: how much pipeline sits in each stage, and in which quarter is it expected to close? A Pivot Table answers it on a Lightning Page, with one row per stage, one column per quarter, and the amount and number of deals in each cell.

Pipeline pivot table with one row per stage, one column group per quarter of this year showing amount and deal count, and grand totals
Pipeline and number of deals for each stage and quarter of this year.

Before you start

  • Opportunities with Amount, Stage and Close Date filled in. The steps use the standard fields only, so any org with opportunity data works.

  • Access to the Avonni Dynamic Components app. If you have never built a component, start with the Quickstart Guide.

Steps

1

Add a Pivot Table to a new component

  1. Create a Dynamic Component and name it Pipeline by Stage and Quarter.

  2. Drag Pivot Table from the component library onto the canvas.

  3. Select it. The Edit Pivot Table panel opens on the right, on the Properties tab.

2

Query this year's opportunities

  1. In the data source part of the panel, create a new query. See Query if you have never built one.

  2. Object: Opportunity.

  3. Add two filter conditions: Close Date equals THIS_YEAR, and Amount greater than 0.

  4. Save the query.

Why: deals without an amount add rows to the counts and nothing to the sums. The Pivot Table query has no sort or limit settings.

3

Put the stages in the rows

  1. In Data Mappings, add an item to Group Rows.

  2. Field: Stage.

Each stage present in the records becomes a row.

4

Put the quarters in the columns

  1. Add an item to Group Columns.

  2. Field: Close Date.

  3. Group: Year-Quarter. This setting appears as soon as the field is a date.

Note: Year-Quarter keeps the year in the header, so the columns stay correct when the query covers more than one year.

Pivot Table data mapping with Stage in Group Rows, Close Date grouped by Year-Quarter in Group Columns, and Amount and Id in Aggregations
The Group setting appears as soon as the field is a date.
5

Add the amount and the number of deals

  1. Add an item to Aggregations: Field Amount, Measure Sum (the default).

  2. Add a second item: Field Id, Measure Count.

  3. On the second item, turn on Custom Label and set Label to Deals.

Each quarter now shows two values per stage: the pipeline and the number of deals. Their headers read Sum Amount and Count Deals.

6

Turn on the totals

  1. Open the Content section.

  2. Turn on Show Grand Total: a total row closes the table and a total column closes each row.

  3. Leave Show Subtotals off. It needs a second group on rows or columns, which this table does not have.

  4. Try Stacked Summaries on and off. It changes how Sum Amount and Count Deals sit next to each other in each quarter. Keep the layout your managers read faster.

7

Give the table a title

  1. Open the Header section.

  2. Title: Pipeline by Stage and Quarter.

  3. Caption: Close dates this year.

8

Save and test

  1. Click Save.

  2. Place the component on a Lightning Page: in the Lightning App Builder, drag AX - Dynamic Component onto the page and select Pipeline by Stage and Quarter. See Publishing your Dynamic Components.

The page shows the title and caption, the stages down the left side, and this year's quarters across the top. Each cell holds the summed amount and the number of deals for that stage and quarter, and the last row and column hold the totals.

Troubleshooting

There is no Group setting under Close Date

Group only appears for a date or date/time field. Check that the item's Field is Close Date and not a text or formula field holding a date.

Show Subtotals changes nothing

Subtotals need more than one group on one side. Add a second item to Group Rows, for example Lead Source under Stage, to get a subtotal per stage.

The table is empty for a colleague

The query runs with the permissions of the person viewing the page. Check that they can read opportunities and the Amount field, and that they can see the records.

Was this helpful?