Stacking Categorical Variables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

Stacking can be thought of as taking separate tables and pasting them together into the same display. For example, you could display information on Gender and Age category in separate sections of the same table.

  1. From the menus, choose:

    Analyze > Tables > Custom Tables...

  2. In the table builder, drag and drop Gender from the variable list to the Rows area on the canvas pane.
  3. Drag and drop Age category from the variable list to the Rows area below Gender.

    The two variable are now stacked in the row dimension.

  4. Click OK to create the table.
Figure 1. Table of categorical variables stacked in rows
Table of categorical variables stacked in rows

You can also stack variables in columns in a similar fashion.