# Pivot

## Overview

The Pivot Node allows you to convert rows into columns and computes aggregate functions as values for the new columns. This transformation is particularly useful for creating cross-tabular views, making comparing and contrasting different data dimensions easier.&#x20;

The reverse operation is [Unpivot](/data-transformation/transforms/unpivot.md).

<figure><img src="/files/BcamtZTzEJyiughPgiKw" alt=""><figcaption></figcaption></figure>

## Settings

![](/files/xpZ2xz05coIwajssjVfX)

#### Create columns from

Select a column from which values you want to create new columns. The Pivot node will create a distinct column for each unique value in the selected column.

#### Group rows by

Select the columns you want to group by. Column order determines group hierarchy.

#### Set values to

Select columns to perform aggregation operations. You can select multiple columns for aggregation.

There are two options for creating aggregations:

1. Predefined aggregation functions. Follow these steps:
   1. Select the column you want to use as a basis for the aggregation.
   2. Choose an aggregation function from the list.
2. Custom Formula. Enable the "Custom Formula" toggle to use a custom formula. With this option, you can define any custom expression that should return an aggregation function.

#### Place values as

Applied only if more than one aggregated column was selected. Select "Columns" to create a new column for each aggregated column, and "Rows" to create new rows for the aggregations instead of columns.


---

# 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.tomat.ai/data-transformation/transforms/pivot.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.
