Survey Tabulation > Advanced expressions > Operators > Arithmetic operators > / operator
 
/ operator
Double
Long
Text
Categorical
Date
Double
Divide Double
Divide Double
Divide1 Double
Not applicable
Divide2 Date
Long
Divide Double
Divide Long
Divide 1 Long
Difference Categorical
Divide2 Date
Text
Divide1 Double
Divide4 Double5
Not applicable
Difference3 Categorical
Divide4 Date
Categorical
Not applicable
Difference Categorical
Difference 3 Categorical
Difference Categorical
Not applicable
Date
Divide2 Date
Divide2 Date
Divide4 Date
Not applicable
Divide Date
See also Notes.
Examples
1. Numeric variables
(visits / 2) > 1
In this example, the / operator is used to divide the visits integer (Long) variable by 2 and compare whether the result is greater than 1.
2. Categorical variables
(biology / education) >= {YES}
This example uses the biology and education variables again. The / operator finds the difference of the two category lists, which means that it returns any categories that are in either one of the category lists, but not in both. The >= operator tests whether the result contains the Yes category. For example, you could use this expression to select respondents who chose the Yes category in response to either one of the questions, but not to both.
Note Like the - and * operators, the / operator is generally useful for categorical variables only if they have identical or overlapping category lists.
See also
Arithmetic operators