# Custom Total Summary Statistics for Categorical Variables

For tables of categorical variables that contain totals or subtotals, you can have different summary statistics than the summaries displayed for each category. For example, you could display counts and column percentages for an ordinal categorical row variable and display the median for the "total" statistic.

To create a table for a categorical variable with a custom total summary statistic:

- From
the menus, choose:
The table builder will open.

- Drag and drop a categorical variable into the Rows or Columns area of the canvas.
- Right-click the variable on the canvas and select Categories and Totals from the pop-up menu.
- Click (check) the Total check box, and then click Apply.
- Right-click the variable again on the canvas and select Summary Statistics from the pop-up menu.
- Click (check) Custom Summary Statistics for Totals
and Subtotals, and then select the custom summary statistics
you want.
By default, all summary statistics, including custom summaries, are displayed in the opposite dimension from the dimension containing the categorical variable. For example, if you have a categorical row variable, summary statistics define columns in the table, as in:

Table 1. Ordinal variable categories in rows, summary statistics count and mean in columns Variables Categories Count Mean Variable 1 1 Agree 196 2 Neutral 936 3 Disagree 744 Total 1876 2.29 To display summary statistics in the same dimension as the categorical variable:

- On the Table tab in the table builder, in the Summary Statistics group, select the dimension from the Position drop-down list.

For example, if the categorical variable is displayed in the rows, select Rows from the drop-down list.