Quota Setup > Expression quotas > Defining expression quotas > Advanced expressions > Functions > ContainsAny
 
ContainsAny
Use the ContainsAny function to define a quota for respondents who have chosen any of a number of listed categories. The categories can belong to a single response variable, a multiple response variable, or a grid subvariable.
Syntax
variable.ContainsAny({Category1_ID, Category2_ID, ...})
Note that the syntax uses the unique ID of the category rather than its label.
Example
You might define the quota expression for young people as:
age.ContainsAny({E1720_years, E2124_years})
This quota expression counts all respondents in the 17-20 years or 21-24 years categories.
Not ContainsAny
You can use the ContainsAny function in combination with the logical operator Not to define a quota for respondents who have not chosen any of a number of listed categories. The categories can belong to a single response variable, a multiple response variable, or a grid subvariable.
The syntax is:
Not variable.ContainsAny({Category1_ID, Category2_ID, ...})
For example, you might define the quota expression for all respondents who are older than 20 years of age as:
Not age.ContainsAny({E1116_YEARS, E1720_YEARS})
This expression selects all respondents except those in the 11-16 years or 17-20 categories.
See also
Functions
AnswerCount