Layers

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

You can use layers to add a dimension of depth to your tables, creating three-dimensional "cubes." Layers are, in fact, quite similar to nesting or stacking; the primary difference is that only one layer category is visible at a time. For example, using Age category as the row variable and Gender as a layer variable produces a table in which information for males and females is displayed in different layers of the table.

  1. Open the table builder (Analyze menu, Tables, Custom Tables).
  2. Click Reset to delete any previous selections in the table builder.
  3. In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.
  4. Click Layers at the top of the table builder to display the Layers list.
  5. Drag and drop Gender from the variable list to the Layers list.

    At this point, you might notice that adding a layer variable has no visible effect on the preview displayed on the canvas pane. Layer variables do not affect the preview on the canvas pane unless the layer variable is the statistics source variable and you change the summary statistics.

  6. Click OK to create the table.
    Figure 1. Simple layered table
    Simple layered table

    At first glance, this table doesn't look any different than a simple table of a single categorical variable. The only difference is the presence of the label Gender Male at the top of the table.

  7. Double-click the table in the Viewer window to activate it.
  8. You can now see that the label Gender Male is actually a choice in a drop-down list.
  9. Click the down arrow on the drop-down list to display the whole list of layers.

    In this table, there is only one other choice in the list.

  10. Select Gender Female from the drop-down list.
Figure 2. Simple layered table with different layer displayed
Simple layered table with different layer displayed