# Pivot table

### Pivoting dimensions and measures

Use the **Pivot Table** option to easily re-structure your dimensions and measures and select the aggregation for totals and subtotals.

<figure><img src="/files/1ghiPbRKCPdFniLZ1uqS" alt=""><figcaption><p>Pivot table interface</p></figcaption></figure>

### 1. Converting rows into columns

You can pivot row and column dimensions by dragging them into the respective buckets. Let's look at how to convert the Region column dimension into a row dimension.

<figure><img src="/files/27RCbmOqryg3Wg3lNWxU" alt=""><figcaption><p>Region column dimension</p></figcaption></figure>

Drag the Region dimension from the Columns bucket to the Rows bucket to pivot the columns into rows.

<figure><img src="/files/H1mm9Qlqb2IFH9VJpDbK" alt=""><figcaption><p>Column to row conversion</p></figcaption></figure>

### 2. Aggregating numeric measures

When you enable totals and subtotals, you can also specify the type of aggregation to apply: sum/average/minimum/maximum.

<figure><img src="/files/D827XCyIpF9UgqOpMjst" alt=""><figcaption><p>Aggregation type</p></figcaption></figure>

In this query, we've applied summation for the Profit measure and average for the Sales measure.

<figure><img src="/files/UteSL454fbkcfIQN2Mif" alt=""><figcaption><p>Aggregated measures</p></figcaption></figure>

### 3. Converting text dimensions into measures

You can convert text dimensions into measures and vice versa. Drag the dimension into the Values bucket to convert it into a measure.

### 4. Concatenating text measures

Use the **Concat** option to aggregate strings from multiple rows into a single string, with a delimiter of your choice. For instance, you can concatenate all the accounts under a particular segment and analyze data at a higher granularity, without losing any information.

<figure><img src="/files/DjXgAb6DdlIm7qgCPJ18" alt=""><figcaption><p>Concatenating text measures with a delimiter</p></figcaption></figure>

Individual accounts are rolled up at Account type level, providing a concise summary of the dataset. The aggregated rows can then be consumed in other destination visuals.

<figure><img src="/files/w2W94ijJZ1UbyGUM9ea6" alt=""><figcaption><p>Aggregated text measure</p></figcaption></figure>


---

# 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.inforiver.com/infobridge-wb-matrix-only/9.-data-transformations/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.
