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

# Pivot Table

> Pivot tables let you explore an alternate, customizable visualization of your data, mixing horizontal and vertical layout in the same table.

Pivot tables are charts that let you explore an alternate visualization of your data in a wide, customizable table. With pivot tables, you can use the same table to visualize some of your data horizontally, and some vertically.

To visualize your search as a pivot table, click the **change visualization** icon and select **pivot table**. You need at least one attribute and one Measure in your search.

Restructure your pivot table by dragging and dropping Measures and attributes under **edit chart configuration**, or by dragging and dropping column headings on the table itself.

Right-click a row or column heading to open a contextual menu, letting you **exclude** or **include** values, [drill down](/s/article/drill-down-into-your-data), **show underlying data**, **SpotIQ analyze**, or **sort**.

## Sort

Right-click a row or column heading, subheading, or a Measure or attribute name, and select **Sort**. You can also sort from the search bar:

```text theme={null}
sort by <column name> [ascending | descending]
```

### Limitations

* You can only sort on one attribute at a time.
* Sorting by a Measure sorts both columns and rows.
* Sorts don't save when you save a pivot table.

## Expanding or collapsing columns and rows

Click a column or row heading to expand it. You can also expand or collapse all columns and rows by right-clicking the arrow in the top-left of a cell. Pinning a pivot table to a Dashboard retains your expansion settings.

## Display totals

You can see your data as a percent of a row or column total, or as a percent of the grand total. Grand totals aggregate all the data in your pivot table.

Click the **edit chart configuration** icon, then **settings** at the bottom of the panel, and choose whether you want data shown as a percent of a row total, column total, or grand total. You only see a 100% value when grand total rows is enabled. Select **Pivot Summaries** in the **Settings** menu to see row and column totals.

## Format row headers

Select **Compact row headers** in the **Settings** menu for a more compact, tree-style layout. Change the type of total shown for an aggregated Measure from the header menu that appears when you click a header's **more** icon.

## Heatmap mode

Turn on heatmap mode to see which Measures contribute more to the total than others within the table. Click **edit chart configuration**, then **settings**, and select **heatmap mode**.

## Pivot table limitations

* Displays a maximum of 100k rows — a query returning more can't be visualized as a pivot table.
* Doesn't support conditional formatting.
* Doesn't support use of [group aggregation functions](/s/article/group-aggregation-functions).
* If the underlying query contains the `top` or `bottom` keyword, column and row summaries aren't accurate.
* You can't filter aggregated columns or columns with aggregated formulas.

## Where to go next

* [Results that are tables](/s/article/results-that-are-tables)
* [Drill down into your data](/s/article/drill-down-into-your-data)
