Stack Columns

Stack columns command combines multiple data columns into a two columns – one column (Value) with observations (data values) and one additional column (Group), indicating from which column the observation originated. To inverse the operation – use the Unstack column command.

How To

Run: Data → Stack columns command.

Select columns to stack.

If Use column numbers as group names option is checked – variable names are ignored and the column indices are used instead.

Example

1.       Open the sample dataset: [Stacked and unstacked data.xls].

2.       Run the Stack Columns command and select E:I columns as variables.

3.       Worksheet with the stacked data is produced.