# MarketSight - Mathematical Variables

#### Overview

A typical mathematical user defined variable is based on a continuous (numeric) uploaded variable, and allows you to perform basic mathematical operations such as addition, subtraction, multiplication and division. Missing values **cannot** be evaluated in mathematical statements and will prevent subtraction, multiplication and division operations from being run.

For example, we have a variable where respondents were asked to estimate the minutes they used each month. We want to multiply these numbers by 12 to get a picture of the yearly minutes used.

#### Create a Mathematical Variable

- On the Variables page, click New
- Select "Mathematical" from the list
- Type in a name for the new variable
- Specify the formula expression for the variable
- To add a variable value:
- Select the variable from the dropdowns
- Click Add to Definition

- To include a constant number such as 12:
- Choose "Constant"
- Type in the number
- Click Add to Definition

- To add a variable value:
- Click OK

#### Complex Expressions

The logic within a mathematical variable can become more complex. For example, let's try to build a formula for a similar variable called ”Monthly Revenue”:

**(Price * Annual Volume) / 12**

- Construct the first part of the expression:
- Click the open parenthesis [ ( ] button in the upper right
- Choose ”Variable” from the Type drop-down
- Select the Category ”Financial” from the Category list in the upper left
- Select the Variable ”Price”
- Click [Add to Definition] to move this Variable into the expression window
- Click on the multiplication operator [ * ] in the upper right
- Select the Variable ”Annual Volume” from the Variable list
- Click [Add to Definition] to move this Variable into the expression window
- Click the [ ) ] button to finish the first part of the expression

- Construct the second half of the expression:
- Click the division operator [ / ]
- Choose ”Constant” from the Type drop-down
- Type the number ”12” into the Value box
- Click [Add to Definition] again to move this constant Value into the expression window
- Click OK to save your changes