> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/tutorials/components/pivot-table/show-a-pipeline-summary-and-drill-into-any-cell.md).

# Show a Pipeline Summary and Drill Into Any Cell

Build a screen flow that shows open pipeline by region and stage, with a grand total, and lists the deals behind any number a manager clicks.

A sales manager reviews open pipeline every Monday. She wants one grid: regions down the side, stages across the top, the sum of Amount in each cell. When a number looks off, she clicks it and sees the deals that make it up, without leaving the screen.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FtmF3I5azlI6MXTZ1Lj6P%2Fpivot-table-show-a-pipeline-summary-and-drill-into-any-cell-result.png?alt=media" alt="Pivot Table with open pipeline grouped by region down the side and by stage across the top, with a Total row and column"><figcaption><p>Open pipeline by region and stage, with totals on both axes.</p></figcaption></figure>

## Before you start

* Opportunities with an **Amount** and a **Stage**.
* A field to group by region. This tutorial uses a custom picklist named **Region** on Opportunity. Any picklist works the same way, for example **Type** or **Lead Source**.
* Permission to create and run screen flows.

## Steps

{% stepper %}
{% step %}

### Add the Pivot Table to a screen

1. In Setup, open **Flows**, click **New Flow** and choose **Screen Flow**.
2. Add a **Screen** element and label it `Pipeline Review`.
3. In the **Components** panel, search for `pivot` and drag **Avonni Pivot Table** onto the screen.
4. With the component selected, click **Open Component Builder**.

The flow needs no Get Records: the Pivot Table runs its own query.
{% endstep %}

{% step %}

### Point the query at open opportunities

In the **Properties** tab, under the data source:

1. Set **Object API Name** to `Opportunity`. **Query** is already selected: it is the only data source this component offers.
2. Under **Filters**, add a condition: **Closed** Equals `false`.

Build the conditions here in the query editor. A filter set from a flow text variable does not reach the detail rows you turn on later (see the [Pivot Table](https://docs.avonnicomponents.com/flow/flow-components/pivot-table.md) troubleshooting).
{% endstep %}

{% step %}

### Group the rows by region and the columns by stage

Scroll to **Data Mappings**.

1. Under **Group Rows**, add an item and set **Field** to **Region**.
2. Under **Group Columns**, add an item and set **Field** to **Stage**.

Want closing months across the top instead of stages? Use **Close Date** with a **Date Grouping**, as shown in [Group a Pivot Table by Date](https://docs.avonnicomponents.com/flow/tutorials/components/pivot-table/group-a-pivot-table-by-date.md).
{% endstep %}

{% step %}

### Sum the amounts

1. Under **Aggregations**, add an item.
2. Set **Field** to **Amount** and keep **Aggregation** on **Sum**.
3. Turn on **Custom Label** and enter `Pipeline` as the **Label**.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F4ITOjXs2ojmRFqEapCUV%2Fpivot-table-show-a-pipeline-summary-and-drill-into-any-cell-mappings.png?alt=media" alt="Aggregation item opened in the property editor with Amount as field, Sum as aggregation, Custom Label on and Pipeline as label" width="320"><figcaption><p>Amount summed, with Pipeline as its label.</p></figcaption></figure>
{% endstep %}

{% step %}

### Add a title and a grand total

1. At the top of the **Properties** tab, turn on **Show Grand Total**. The table gets a **Total** row and a **Total** column.
2. Open the **Header** group and enter `Open pipeline by region` as the **Title**.

Subtotals need a second grouping on an axis. [Show Totals, Subtotals and Stacked Summaries](https://docs.avonnicomponents.com/flow/tutorials/components/pivot-table/show-totals-subtotals-and-stacked-summaries.md) adds them.
{% endstep %}

{% step %}

### Let the manager open any number

1. Open the **Detail Rows** group and turn on **Detail Rows**.
2. Optional: turn on **Enable Inline Edit** so she can correct an amount in place.
   {% endstep %}

{% step %}

### Save and test

Close the Component Builder, save the flow and click **Debug** (or **Run**).

The screen shows one row per region and one column per stage, each cell holding the sum of Amount, with a **Total** row and column. Regions and stages are sorted alphabetically, and a cell with no deals shows $0.00. Click a cell: a panel opens under the grid with the deals behind that number, their name and amount, and the region and stage they came from. The panel numbers its rows.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FXWrJGCv07KnxYPcFQefD%2Fpivot-table-show-a-pipeline-summary-and-drill-into-any-cell-detail.png?alt=media" alt="Pivot Table with one cell selected and a panel below listing the opportunities behind that amount"><figcaption><p>A clicked cell lists the deals behind the number.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Troubleshooting

<details>

<summary>The grid is empty</summary>

Check **Object API Name**, and that **Group Rows**, **Group Columns** and **Aggregations** each have a field. If no open opportunity matches the filter, the table shows its no results message.

</details>

## Related tutorials

* [Show Totals, Subtotals and Stacked Summaries](https://docs.avonnicomponents.com/flow/tutorials/components/pivot-table/show-totals-subtotals-and-stacked-summaries.md): subtotals per region and two measures in one cell.
* [Group a Pivot Table by Date](https://docs.avonnicomponents.com/flow/tutorials/components/pivot-table/group-a-pivot-table-by-date.md): closing months or quarters instead of stages.
* [Let Users Filter a Pivot Table](https://docs.avonnicomponents.com/flow/tutorials/components/pivot-table/let-users-filter-a-pivot-table.md): header filters so each manager narrows the grid herself.
* [Export a Pivot Table and Add Header Actions](https://docs.avonnicomponents.com/flow/tutorials/components/pivot-table/export-a-pivot-table-and-add-header-actions.md): download the grid to Excel and add a Refresh button.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/tutorials/components/pivot-table/show-a-pipeline-summary-and-drill-into-any-cell.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
