> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usedatabrain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pivot Table

> Set up Pivot Table, Pivot Table 2, and Pivot Table 3.

Pivot tables show data in rows and columns with measures as values. Pivot Table 2 and 3 add column headers, dynamic pivot columns, and row aggregates.

## Chart Types

| Chart             | Use case                              |
| ----------------- | ------------------------------------- |
| **Pivot Table**   | Basic pivot: rows and columns         |
| **Pivot Table 2** | Column headers, dynamic pivot columns |
| **Pivot Table 3** | Columns, rows, row aggregates         |

## Data Requirements

* One or more **dimensions** (for rows and/or column headers)
* One or more **measures** (for cell values)

## How to Set Up

1. Create or edit a metric with dimensions and measures.
2. Click the **Charts** icon and choose **Pivot Table**, **Pivot Table 2**, or **Pivot Table 3**.
3. Click **Settings** → **Chart types** → **Chart properties**.
4. Under **Required Axis**:
   * **Pivot Table**: Choose **Metrics** and **Group by** (dimensions for structure).
   * **Pivot Table 2 / 3**: Configure in **Pivot Settings** (gear or configuration panel):
     * **Columns** / **Headers**: Dimensions for column headers.
     * **Rows** / **Dimensions**: Dimensions for row structure.
     * **Measures**: Measures for cell values.

## Pivot Table 2 Options

* **Dynamic pivot columns**: Column headers come from dimension values in your data (e.g., months as columns).
* **Headers**: Which dimensions appear as column headers.

## Pivot Table 3 Options

* **Columns** and **Rows**: Define the pivot structure.
* **Show Row Aggregates**: Add a summary row (e.g., Total) at the bottom.
* **Aggregate Type**: Sum, Average, or Count for the aggregated row.
