# Pivot Data

Pivot data turns the unique values within one column of a table into the column name(s) for the resulting column(s).

![](https://lh6.googleusercontent.com/xnbcDxD2psIUGODqH4wCGzv8Lz9Z-bhDRSRDUjAi-tsw7LgHpWKwWnTBT9Cw8flr20O6QAKKaaBdXaf9P_PFHkO5yeYdIFBiykY6v9QIrLdp-zfsOwJ1KNihokBkxWDwbqCQGlaY)

The values within the Person Column are pivoted to be columns in the resulting table.

![](/files/tFWvEWJ9nalXcN0gNlOh)

## **Aggregations**

Pivot Data can then perform aggregation calculations on the resulting column values based on the selected aggregation type.

Along with None, the available aggregations include:

* Count&#x20;
* Count (Including Nulls)&#x20;
* Count Distinct&#x20;
* Count Distinct (Including Nulls)&#x20;
* First Value (Ascending or Descending)
* Last Value(Ascending or Descending)
* Sum&#x20;
* Average&#x20;
* Median&#x20;
* Standard Deviation (Partial Sampling or Entire Population)
* Variance (Partial Sampling or Entire Population)

The count functions result in a number value in the generated columns, and the Value functions result in the First or Last value depending on sorting result.

## Implementing Pivot Data

Select the desired column(s) to show as rows. This will maintain the selected column header(s) in the resulting table.

Next, select Column Values to Show as Columns.&#x20;

Input the new column names based on the values within the column. Verb will search the selected column for the matching value and creates a new column using the input value as the column header.

Finally select the value column to display. In the example below, this is the Miles run for the week.&#x20;

![](/files/TzlK48FSNAbxzDUwypL9)


---

# 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.verbdata.com/data-transformations/building-transformations/transformation-steps/pivot-data.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.
