Introduction to filter expressions
A filter is a logical expression that allows you to restrict or limit a particular question based on a specified criteria. A question is asked if the expression is TRUE.
For example, [Q1] relates to gender and this has two answers: Male and Female. The first answer, Male, has a value of “1” while the second answer, Female, has a value of “2”.
[Q2] is a question that should be directly only to women. In such an instance, you should insert a filter on [Q2] such that this question will be asked only if the response in [Q1] is “Female’. The filter attribute in [Q2] would be filter: \Q1=2.
A filter is generally used in four different ways:
- A Filter is set on a sub question element
- Applies to any type of question
- For example, filter: \Q3=1:2
- This means that the question is asked only if a 1 or 2 is answered for [Q3].
- A Filter is set on a section element
- A Filter is set on a row element
- Applies to question types (single grid, multi grid, numeric and time)
- For example, filter: \Q3=1:2
- This means that the row-question is asked only if a 1 or 2 is answered for [Q3].
- Synchronize Filter in Question with several Sub Questions (Use of %)
- Used often when combining opinions in profile questions, where both sub questions are part of the same Question.