# Simple Computed Category

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

Analyze > Tables > Custom Tables...

2. In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.
3. Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up menu.
4. Select 3.00 in the Value(s) list.
5. Click Add Category to display the Define Compute Category dialog box.
6. In the Label for Computed Category text field, type Less than 45.
7. Select Less than 25 (1.00) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box. [1] is displayed in the expression.
8. Click the plus (+) operator button in the dialog box (or press the + key on the keyboard).
9. Select 25 to 34 (2.00) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.
10. Click the plus (+) operator button in the dialog box (or press the + key on the keyboard).
11. Select 35 to 44 (3.00) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.
12. Then click Continue.

This inserts a row containing the subtotal for the first three age categories.

13. Select 5.00 in the Value(s) list.
14. Click Add Subtotal to display the Define Subtotal dialog box.
15. In the Label text field, type Less than 65.
16. Then click Continue.

This inserts a row containing the subtotal for the first the first five categories.

17. Click Apply and then click OK in the table builder to create the table.

The table includes a computed category (Less than 45) and a subtotal (Less than 65). The subtotal includes categories also included in the computed category. You could not create the same table with subtotals alone, because subtotals cannot share the same categories.