Constructions are used to create new items or variable types in a project. New variables can be created using items that already exist in the project, or with user entered values.
A new measure can be created by first selecting the desired position in the project tree and then choosing new measure under construct from the design menu Learn more about the design menu. and then defining the expression in the editor.
- New measures can be constructed from existing measure, or weight, values, or by entering values explicitly into the definition.
- Measures contain a single value for each respondent.
- Records to be excluded from the measure’s count need to be assigned a NULL value.
Conditions and Functions
a) If statements
Used to populate a new measure or weight with a different value depending on specific conditions
- The syntax for the if statement is:
if (Logic_Test, Value_if_True, Value_if_False)
- The syntax for a nested if statement is:
if (Logic_Test, Value_if_True, if (Logic_Test, Value_if_True, Value_if_False))
b) Count responses
A measure counting responses in a standard axis can be created using the count function
- The syntax for the count function of a measure is:
Measures can also be defined using calculations, i.e.
- Addition using +
- Subtraction using -
- Multiplication using *
- Division using /
Let's assume you want to create an "Other Costs" measure containing the amount spent that wasn’t on airfares or packages, i.e. the amount left after subtracting airfares and packages from total spend.
Where to from here?
Learn more about different construction types.