For the latest version of JMP Help, visit JMP.com/help.


Using JMP > Reshape Your Data > Stack Columns
Publication date: 11/10/2021

Stack Columns

You can rearrange your data table by stacking two or more columns into a single new column, preserving the values from the other columns. Or, you can stack a set of columns into multiple groups. The various ways that you can stack columns are explained in Stack Options.

To stack columns, follow these steps:

1. Select Tables > Stack.

Figure 6.8 Stack Window 

Stack Window

2. Highlight the names of the columns that you want to stack and click Stack Columns.

3. Customize your stacking further using the additional options.

4. Click OK.

Stack Options

Select Columns Filter Menu

Contains options to search and filter through columns. See Column Filter Menu.

Multiple series stack

Stacks selected columns into two or more columns. Specify the number of columns into which you want the selected columns to be stacked by entering the number into the Number of Series box. This box appears when you check the box beside Multiple series stack.

Select the Contiguous option if the series consists of adjacent columns.

See Example of Stacking Columns into More Than One Column.

Note: The order in which you add columns to the box on the right determines the group to which they belong.

Stack by Row

Stacks columns by rows. Deselect the option to stack one column underneath another. Selected by default.

Eliminate missing rows

Eliminates missing data from the new table. If Stack by Rows is checked also, only rows with all data missing are eliminated.

Non-stacked columns

Includes or drops non-stacked columns from the new data table. Select one of these options:

Keep All

Includes all of the non-stacked columns from the original table in the new table. Selected by default.

Drop All

Omits the non-stacked columns from the new table.

Select

Select the non-stacked columns that you want to include or drop in the new table.

Keep dialog open

Keeps the Stack window open after you click OK.

Save Script to Source Table

Saves a script to the original data table that enables you to stack the data again using the same settings.

Stack Columns

Adds the columns that you want to stack.

Remove

Removes any highlighted columns.

Output table name

(Optional) Specifies the name of the new table.

Stacked Data Column

Assigns a name to the column that will contain the data for the stacked columns. The default name is Data. Leave the box empty if you do not want this column to appear in the new table.

Source Label Column

Assigns a name to the column that will contain the original table’s column names. The default name is Label. Leave the box empty if you do not want this column to appear in the new table.

Copy formula

Includes formulas from the original table in the output columns. Selected by default.

Suppress formula evaluation

Prevents JMP from evaluating columns’ formulas when the new table is created. Selected by default.

Move Columns

Specifies where the stacked columns are moved to. To Last is the default value.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).