Gather

<< Click to Display Table of Contents >>

Navigation:  Reference > Transforms >

Gather

Description

Gather multiple columns into new key and value columns. Also called a long pivot or group by.

 

Inputs

One.

 

Options

Select the Columns you wish to gather.

Set Key column name to the name of the new key column, which will have values based on the names of the columns selected.

Set Value column name to the name of the new value column, which will have values based on the values in the columns selected.

 

Example

gather example

 

With columns Q1, Q2, Q3 and Q4 gathered:

 

gather transform

 

Gives:

 

gather-long-pivot-example-3

 

Notes

New columns are added at the right end. You can change the column order with Reorder Cols.

You can merge the value and key columns into a single column with Concat Cols.

The opposite of Gather is Spread.