Skip to Content

Unfold Columns

Creates new columns by grouping the values of multiple rows in a single column.

example

record_idplayer

result

count

2022-3-1-01Johnwin3
2022-3-1-02Johnloss1
2022-3-1-03Davewin2
2022-3-1-04Daveloss2
2022-3-2-01Johnwin2
2022-3-2-02Johnloss4
2022-3-2-03Davewin5
2022-3-2-04Daveloss1

unfold:

result

on:

count

record_idplayer

win

loss

2022-3-1-01John3null
2022-3-1-02Johnnull1
2022-3-1-03Dave2null
2022-3-1-04Davenull2
2022-3-2-01John2null
2022-3-2-02Johnnull4
2022-3-2-03Dave5null
2022-3-2-04Davenull1

Configuration

The following option(s) are available when configuring this transform.

Column

Select a column to unfold to have its values used as column names.

Measure

Select a column to have its values used in the new columns.

Unfold Values (optional)

Enter the value variants from the original column to create new columns with. Leave empty to include all variants.

Screenshot of the Unfold transform configuration

Adding the Transform

  1. Select two columns by clicking on any column header in the table.
  2. Type unfold in the filter input.
  3. Find Unfold transform under Row Manipulation group.

Alternatively, you can click on + Add Script Step on the right of the wrangler to find Unfold transform after expanding Row Manipulation group.

Screen recording of adding the Unfold transform

Key Considerations

  • This transform replaces the original columns with new columns.
  • If all other values are identical among rows with multiple variants, they are merged into a single row.