Skip to content

Pivot columns

Description

The Pivot Columns activity restructures tabular data by converting unique values in a column into new columns, effectively transposing selected rows into columns. This transformation is useful when converting long-format data into wide-format, making it easier to visualize and analyze grouped or categorized datasets.

It creates a matrix where:

  • Each unique value in the Index Column becomes a row
  • Each unique value in the Labels Column becomes a new column
  • The cell values come from the Values Column

Use this activity to:

  • Convert transactional or long-form data into cross-tab reports
  • Generate summaries where categories are converted into columns
  • Restructure datasets for dashboarding or pivot-based analytics

Use case: A retail company wants to analyze product prices across departments. Using Pivot Columns, they can convert individual product rows into columns under each department, making comparisons easier.

Input

TypeStatusDescription
DataRequiredA table with at least three columns: one for row identifiers (index), one for labels (column names), and one for values.

Output

Output TypeFormatDescription
DataTableTransformed table with rows as index values and columns as labels.

Configuration Fields

Field NameDescription
Index ColumnThe column whose unique values will be used to create the output rows. A new row is generated for each unique index value.
Labels ColumnThe column whose unique values will become column headers in the output. Each distinct value in this column becomes a column in the result.
Values ColumnThe column that provides the values to fill in the pivoted table. If multiple entries exist for the same index-label pair, the last one is used.

If multiple rows have the same combination of index and label, only the last one is retained in the output.

Sample Input

idcategoryproductpricein_stock
1ElectronicsLaptop500true
2ElectronicsCamera350false
3ElectronicsTablet250true
4FurnitureSofa600true
5FurnitureBed450true
6FurnitureTable150false

In this example, we want to create one row per category, one column per product, and fill the table with price values.

Sample Configuration

FieldValue
Index Columncategory
Labels Columnproduct
Values Columnprice

Sample Output

categoryLaptopCameraTabletSofaBedTable
Electronics500350250
Furniture600450150