Desktop User Guides > Reporter > Using variables > New Variable dialog > Create New Variable Based On dialog
 
Create New Variable Based On dialog
Use the Create New Variable Based On dialog to specify the formula for a new variable.
Enter the formula in the form of an expression. This expression also defines the base for the new variable when you use it in a table. For example, if you define the expression as the name of another variable, the new variable has the same base as the other variable. If you leave the definition blank, UNICOM Intelligence Reporter uses {}, which means that all respondents are included in the base for the variable.
To open the Create New Variable Based On dialog, click Select in the New Variable dialog.
Existing variables
The dialog displays all the variables in the current table document (.mtd) file. Select the variable, and then click the >> button to add it to the expression for the new variable.
New variable syntax
Use this area to define the formula for the new variable. You can add variables by dragging them from the Existing variables list, or by typing the variable names. You can use any expression that is supported by the UNICOM Intelligence Data Model, including the functions in the UNICOM Intelligence Function Library: see the Function list. See also Expressions and UNICOM Intelligence Function Library.
How you specify variables in the expression depends on whether you are using the hierarchical or flat view of the data:
When using the flat view, you cannot use any lower level variables or slices of variables.
When using the hierarchical view, the level of the new variable and the expression is defined by the position of the new variable in the Variable List. Specify the names relative to the level of the new variable. (However, the names of variables inside a block should generally be preceded by the block name followed by a period (.). For example, to specify the Serial variable inside the Respondent block, specify the name as Respondent.Serial.) If you include in the expression any variables from other levels, you need to up-lev or down-lev them to the level of the new variable. ee Filtering hierarchical data.
See also
New Variable dialog