Fold Columns
Creates new rows by combining the values of multiple columns into one.
example
date | player | win | loss |
---|---|---|---|
2022-3-1 | John | 3 | 1 |
2022-3-1 | Dave | 2 | 2 |
2022-3-2 | John | 2 | 4 |
2022-3-2 | Dave | 5 | 1 |
fold:
win
,
loss
date | player | fold | value |
---|---|---|---|
2022-3-1 | John | win | 3 |
2022-3-1 | John | loss | 1 |
2022-3-1 | Dave | win | 2 |
2022-3-1 | Dave | loss | 2 |
2022-3-2 | John | win | 2 |
2022-3-2 | John | loss | 4 |
2022-3-2 | Dave | win | 5 |
2022-3-2 | Dave | loss | 1 |
Configuration
Select one or more columns to fold on when configuring this transform.

Adding the Transform
- Select one or more columns by clicking on any column header in the table.
- Type
fold
in the filter input. - Find Fold transform under Row Manipulation group.
Alternatively, you can click on + Add Script Step on the right of the wrangler to find Fold transform after expanding Row Manipulation group.

Key Considerations
- This transform replaces the original columns with new columns.
- The default names of the two new columns are
fold
andvalue
, to change them you can use the Rename Column transform. - Values that aren’t folded in the original row are duplicated to the new rows.