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

# Pivot columns

> The **Pivot columns** step takes a column and turns its values into multiple columns. It is particularly useful when needing to turn order line item information into a unique row per order.

## Input/Output

In the example below, our input data has duplicate values in the "Order ID" column, plus other columns specifying "Variant Option" and  "Variant Value".

<Frame>
  <img src="https://mintcdn.com/parabola-7119dfb0/55xSH1bSQs7FexjG/images/transforms/image-5.png?fit=max&auto=format&n=55xSH1bSQs7FexjG&q=85&s=a379b578b025af72deac966d451750e0" alt="Input table with duplicate Order ID rows and Variant Option / Variant Value columns" width="1086" height="752" data-path="images/transforms/image-5.png" />
</Frame>

We'll want to create a unique row per "Order ID" where the "Variant Option" becomes the column headers and "Variant Value" becomes the cell value in the corresponding columns. The **Pivot columns** step accomplishes this for us.

<Frame>
  <img src="https://mintcdn.com/parabola-7119dfb0/55xSH1bSQs7FexjG/images/transforms/image-6.png?fit=max&auto=format&n=55xSH1bSQs7FexjG&q=85&s=c5cc903bec8a2a6dab196898b54ba2d0" alt="Output table pivoted to a single row per Order ID with Variant Option values as new column headers" width="1178" height="434" data-path="images/transforms/image-6.png" />
</Frame>

## Custom settings

Once you connect data to the **Pivot columns** step, you'll select a **Column to pivot into new column headers**, and you'll select a **Column with values to fill in**

In the example below, we selected the "Variant Options" column to be the pivot column, and we selected "Variant Value" column to be the value column. If no "Variant Value" exists for the corresponding "Variant Options" column header, the cell is left blank.

<Frame>
  <img src="https://mintcdn.com/parabola-7119dfb0/55xSH1bSQs7FexjG/images/transforms/image-7.png?fit=max&auto=format&n=55xSH1bSQs7FexjG&q=85&s=24d15d0d41f8fe1d3b182b15378b8353" alt="Pivot columns step settings showing the Variant Options column selected as headers and Variant Value as fill values" width="2412" height="1488" data-path="images/transforms/image-7.png" />
</Frame>

## Frequently asked questions

**What if multiple rows share the same pivot column value?**

When several input rows have the same value in the column being pivoted, the **Pivot columns** step keeps the last matching value seen. To consolidate values before pivoting, use [Merge duplicate](/product/transform/merge-duplicate-rows) or [Sum by group](/product/transform/sum-by-group) first.

**How do I reverse a pivot?**

Use the [Unpivot columns](/product/transform/unpivot-columns) step to collapse pivoted columns back into a longer format with one row per value.

**Why are some cells blank in the output?**

A blank cell means the original input had no value for that combination of identifier and pivoted column header. This is expected when not every entity has every category of data.

## Related steps

* [Unpivot columns](/product/transform/unpivot-columns) — reverse a pivot by collapsing columns back into rows.
* [Merge duplicate](/product/transform/merge-duplicate-rows) — combine duplicate identifier rows before pivoting.
* [Sum by group](/product/transform/sum-by-group) — aggregate numeric values by category.
* [Flip table](/product/transform/flip-table) — swap rows and columns when reshaping data.
* [Combine tables](/product/transform/combine-tables) — join the pivoted output to another dataset.
