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

# Pivoting query results in Omni workbooks

> Build pivot tables in Omni workbooks by pivoting dimensions and measures to cross-tabulate and summarize your query results.

Quickly build pivot tables by right-clicking any field in the field picker and selecting the **Pivot** option.

## Flattening and filtered measures

You can also flatten the pivot and create filtered measures by clicking the **actions menu** (three dots) on a column and selecting **Flatten pivot**. When using this feature you can also choose to create an **Other** bucket on the fly:

<img src="https://mintcdn.com/omni-e7402367/UAlPtpzOyrORJCGb/images/docs/querying-and-sql/assets/images/flatten-pivots-18e7d12b74cd86278c97053e12ac3452.png?fit=max&auto=format&n=UAlPtpzOyrORJCGb&q=85&s=a1354131ea191809cdd9e9e04d676038" alt="" width="972" height="588" data-path="images/docs/querying-and-sql/assets/images/flatten-pivots-18e7d12b74cd86278c97053e12ac3452.png" />

The new filtered measures will appear under the **Tab-only fields** section and the field that was originally pivoted on will no longer be selected as a field that is in-use.

## Grouping measures

* **Group Measures in Pivot** - **Applicable to pivot tables**. When enabled, measures in a pivot table will be grouped together. Open the toggle below for an example.

  <Accordion title="Grouped measures in pivot example">
    Let's say you have the following table, which is pivoted using `Status`:

    | Status | Processing      | Processing      | Completed       | Processing      |
    | ------ | --------------- | --------------- | --------------- | --------------- |
    |        | **Total Sales** | **Order Items** | **Total Sales** | **Order Items** |
    |        | 44,562.32       | 564             | 100,892.61      | 2,654           |

    If **Group Measures in Pivot** is enabled, the table would become this:

    | Status | Processing      |                 | Completed       |                 |
    | ------ | --------------- | --------------- | --------------- | --------------- |
    |        | **Total Sales** | **Order Items** | **Total Sales** | **Order Items** |
    |        | 44,562.32       | 564             | 100,892.61      | 2,654           |
  </Accordion>
