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:
![](https://static.packt-cdn.com/products/9781787283817/graphics/assets/b68d2017-d7d8-455e-98f2-d054312ac796.png)
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:
![](https://static.packt-cdn.com/products/9781787283817/graphics/assets/b8ff2331-d5cf-4cbc-ba44-b43f5a111a38.png)
The syntax produced from the dialog box is shown next:
COMPUTE meansat=MEAN...