Filters can be used on 3 Layers. On this page, we will see some examples to explain how they work. We will start with the highest layer: the Section, then we will take a look at question filters. Last but not least, we will look at the answer option filter.
A section filter is useful to show or hide several questions at once.
Let’s say you firstly ask your respondent which of four products they use frequently. Following this, you ask them several questions about each of the chosen products. So you put all questions for each product in its own section (as seen in the picture above).
Now you can set a filter like “Show Section Product 1 if in question product_select Product 1 was selected”.
A question filter is the easiest way to filter a question, because it only affects that particular question.
For example, you ask your respondent how they would rate a product. If the rating is bad, you want to know why. Now you can set a filter on the second question like “Show this element if q1 ‘How would you rate Product 1?’ option ‘bad’ is selected.”
For question choices, rows and columns can also include filters.
For example, you firstly ask your respondent which of four products they use frequently. Following this, you want the respondent to rate these products within a matrix question. You can set a filter on each row of that matrix question like “Show this element if product_select ‘What products do you use frequently?’ option ‘Product 1’ is selected”.
Note: If all choices, rows or columns of a question are hidden, the whole question gets hidden.
To combine conditions in Survalyzer we have two boolean operators. The AND operator and the OR operator. The AND operator binds stronger than the OR operator. To understand what this means, take a look at this diagram:
So basically, when combining conditions with the AND operator, a combined condition is created. When combining conditions with an OR operator, the conditions are dealt with individually.
Within a survey there are several ways to create a filter condition. The first one is, as shown in previous examples, question based filters. The others are Panel, Device, URL Variable, Calculation, Language and Custom Variable.
- URL Variable
- Custom Variable
A question-based filter enables you to design conditions based on answers provided by the respondent given prior to the element the filter is linked to. Depending on the question, the filter module might also show you all possible answer options.
Note: For open questions, the filter module behaves differently depending on the used standard validation of open or semi-open question.
Note: For multiple choice questions, there is an extra choice named "selected count" used to define the number of chosen elements for that question.
A panel-based filter can be used when the respondent is an identified panel member. All information fields included in the panel are available as filter conditions.
Note: Each datatype in the panel is handled differently. For more information see Data Types
A device-based filter enables you to show or hide elements depending on the used device. The system can distinguish between desktop and mobile (Smartphone, Tablet) devices.
In Survalyzer there is a set of 20 URL variables. These can be set by adding them to the URL of the survey. More information can be found on URL Variables Page.
Within a calculation, different conditions can be created. It´s possible to use the following operations: (*) Multiplication, (/) Division, (+) Addition, (-) Subtraction, (%) Modulo
To see how to use the correct variable names within a calculation, take a look at this page.
It´s also possible to compare two strings or dates with one another.
A language-based filter can be used to hide and show questions based on the respondent´s language.