# Pivot Table

## Introduction <a href="#introduction" id="introduction"></a>

The **Pivot Table** displays data in an interactive pivot table, where columns and rows can be collapsed to show individual data for sub-dimensions, as configured by the chart creator:

![Pivot Table](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48078307950/original/mcSoDOGPxPulZzjzFNmzXw3cSRZEAYaGsQ.png?1608797596)

It also, optionally, displays the grand total values per row and column:

![Pivot Table - Grand Total](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48078310567/original/s5vU3cYqmkivBfE81UfigyCkTjc9KlkxxQ.png?1608798744)

## Expected Data and Graph Designer <a href="#expected-data-and-graph-designer" id="expected-data-and-graph-designer"></a>

The Pivot Table doesn't expect data in a specific format, as the configuration of pivot tables is fully flexible. However, it is recommended to do any kind of data aggregation that you want to use in the pivot table, directly in the SQL query in order to increase performance.

In the Graph Designer you can then configure the pivot table in an Excel-like manner:

![Pivot Table Configuration](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48078309153/original/zv4hzcmZ2LcnC_esAUDN3QazwpkNvfKAYQ.png?1608798138)

In the *Live Preview* you can also set number formatting options:

![Pivot Table Number Formatting](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48078310032/original/k9iIbaMAZ2V7G-IPtEOt8qpyj9zFs5l3XA.png?1608798510)

![Pivot Table Number Formatting](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48078310126/original/_BBOAEKj2THWEc0VLZcqiK7329qKDejF1w.png?1608798550)

In the *Input parameters* section, you can configure whether the viewing user is able to export the pivot table as an XLSX, CSV, or PDF file and some additional viewing options:

![Pivot Table Input parameters](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48078309424/original/Ab8_jKiYQkXo9v6otGXgsKfcaZSKQkJWFg.png?1608798225)

## Exporting <a href="#exporting" id="exporting"></a>

Data can be exported as PDF, Excel or CSV:

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/48091630258/original/MburDW-uszlE3khKYYHpNTOX1z_YzdtLAA.png?1615367742)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.locoia.com/data-and-dashboards/dashboards-and-insights/charts/pivot-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
