This article describes how to create a complicated filter with nested conditions in Displayr. Filters can be created out of any of the below data types:
- Numeric ranges
- Single and multiple-response categories
- Aggregated and calendar date period ranges
- Text content
In this example, we wish to create a filter for the following set of group conditions:
- Males under 35 (Nominal crosstab)
- Number of Coca-Cola cans/bottles drunk while out and about is greater or equal to 5 (Numeric)
- Aware of any Coke brands (Binary - Multi)
- Interviewed after 1/1/2012 (Date/Time)
- Preferred cola is a Coke brand (Nominal)
- Mentioned EITHER Coke OR Coca-Cola for Spontaneous Awareness (Text)
- A Displayr document containing a data set.
- A set of variables to be included in a filter.
1. In the toolbar go to Anything > Filter > New.
2. Select the x for the first condition next to Please select data on the right as we will instead be using group conditions.
3. At the top change ALL of these conditions are met to ANY.
4. Select Add Group.
5. Select the Age variable.
6. Select Gender for Column data to produce a crosstab.
7. Tick the first 3 categories in the Male column.
On the right will appear the number of selected respondents for this filter condition:
8. Select Add Condition.
9. Select Coca-Cola - When 'out and about'.
10. Set the drop-down to is greater than or equal to and enter the value of 5.
11. Select Add Condition.
12. Select the Awareness variable.
13. Tick the Coke brands and leave the setting as is any of.
14. Select Add Group.
15. Select Interview Date.
16. Set the drop-down to is after and change date to 1/1/2012.
17. Select Add Condition.
18. Select the Preferred cola variable.
19. Tick the Coke brands.
20. Select Add Group.
21. Select the Spontaneous Awareness: 1st mention text variable.
22. Leave setting as contains but enter Coke in the box.
23. Select Add Condition.
24. Select the Spontaneous Awareness: 1st mention text variable.
25. Leave setting as contains but enter Coca-Cola in the box.
26. Change ALL of these conditions are met to ANY for this group.
27. Update Specify conditions to generate a default name... at the very top to Coca-Cola Segment. If you don't provide a label, Displayr will create one based on your conditions. For example: (Age/Gender is 18 to 24 & Male, 18 to 24 & Female, 25 to 29 & Male, 25 to 29 & Female, 30 to 34 & Male or 30 to 34 & Female and Coca-Cola - When 'out and about' >= 5 and Awareness is any of Coca-Co...
28. Press Create filter.
29. OPTIONAL: You can view and edit the conditions by selecting the variable in the Data Sets tree and clicking FILTER DEFINITION > Modify... in the object inspector.
How to Tag a Variable as a Filter
How to Create a Binary Filter from selected data
How to Create a Text Box Filter
How to Create a Combo Box Filter
How to Create a List Box Filter
How to Connect Filters to Controls using R Code
How to Build Tables that Automatically Filter to the Latest Periods
Article is closed for comments.