Count Occurrences of Values within Cases

This dialog box creates a variable that counts the occurrences of the same value(s) in a list of variables for each case. For example, a survey might contain a list of magazines with yes/no check boxes to indicate which magazines each respondent reads. You could count the number of yes responses for each respondent to create a new variable that contains the total number of magazines read.

To Count Occurrences of Values within Cases

  1. From the menus choose:

    Transform > Count Values within Cases...

  2. Enter a target variable name.
  3. Select two or more variables of the same type (numeric or string).
  4. Click Define Values and specify which value or values should be counted.

Optionally, you can define a subset of cases for which to count occurrences of values.