The COMPUTE command is the workhorse of the transformation capability within SPSS. It provides access to a very broad set of functions that allow one to create logical expressions of virtually any type.
The following figure shows the basic dialog for this command, including a partial list of the many functions you can use and the calculator section with logical operators available:
The MEAN function can be used to create a new field containing each customer's average across the six satisfaction questions included in the survey (refer to following screenshot). Any of the six questions that has a missing value for a row in the data is excluded from the calculation, and the denominator is automatically adjusted to reflect the number of variables used as the basis for the mean:
The syntax produced from the dialog box is shown next:
COMPUTE meansat=MEAN...