## Formula

Use the Formula command to compute values for a variable based on numeric transformations of other variables. Expressions may include columns, numbers, and text, but not matrices or vectors.

- You can compute values for numeric or string (alphanumeric) variables.
- You can create new variables or replace the values of existing variables. For new variables, you can also specify the variable type and all associated properties.
- You can compute values selectively for subsets of data based on logical conditions.
- You can use over 300 built-in functions, including mathematical functions, statistical functions, financial functions, and text functions.

#### Example

The data are the percentage employed in different industries in Europe countries during 1979. The job categories are agriculture, mining, manufacturing, power supplies, construction, service industries, finance, social and personal services, and transport and communications. It is important to note that these data were collected during the Cold War. Principal components analysis may be used to examine which countries have similar employment patterns.

Source: http://lib.stat.cmu.edu/DASL/Datafiles/EuropeanJobs.html

- Open the DataBook mva.vstz
- Select the sheet Cities
- Choose the tab
**Transform**, the group**Compute**and the command**Formula** - In the box beside Target Column, type the new name,
*NewPrice* - In Variables, double-click Price

Click in the formula Expression editing area, and type + 100 - Click
**OK**

Before the operation

After performing the operation

In the variable format properties, you can see the formula "B1 +
100"

You can type this formula manually, after selecting a variable.