Snap provides filters that you can use to limit the data that you are displaying or analysing. You can filter data so that:
- it only includes the people you want (for example, creating a pie-chart showing the sports preferences of Canadian men between ages of 25 and 35)
- it does not include the people you don’t want (for example, excludes all men who like ice-hockey)
- it only includes people who have done things on a certain date or time (for example, watched ice-hockey in November)
This assumes that you had a special promotion on food during September and October. It tells you how to create three satisfaction graphs; one with data for July and August, one with data for September and October, and one with data for November and December, so you can easily see the effects of the promotion. It also describes how to examine the demographics of people who have left comments, in case that affects the type of comments they leave.
Snap filters allow you to limit the data you look at. The most obvious example is on a dating site, when you specify that you are only interested in men between 25 and 30. You are filtering the people on the site by sex and age.
In the same way, you can filter the respondent data that you use in your analyses.
You can filter data by:
- the answers to one or more of the questions
- respondents who did or did not reply to certain questions, for example, you could select all respondents who wrote a comment.
- value of a question response or on data that Snap provides.
The way you filter may be different depending on the type of question.
- filter multi-response values on which code(s) people have selected. You can also filter on how many codes people have selected.
- filter quantity questions by whether the value is larger, smaller, or equal to another value.
- filter by the date or time, or on parts of them such as month, day or hour
- filter text questions on whether the text has been entered, or whether it contains particular words or parts of words
- filter cases by case number
You can also combine filters together using Boolean logic. You may have come across this when using Google or eBay searches.
If you want to find either of two options, then you use the word “OR”. For example, (q7=1) OR (q8=2) finds all the cases where respondents responded 1 to q7 or responded 2 to question 8.
If you want to find cases where respondents responded 1 to q7 and 2 to question 8 filter using (q7=1) AND (q8=2).
If you want to find cases where respondents responded 1 to q7 and didn’t respond 2 to question 8 filter using (q7=1) AND NOT(q8=2).
Step 1: Creating a chart showing satisfaction in July and August
Creating the satisfaction graph for the two months before the promotion
- Open the survey crocodile provided with your copy of Snap. This survey includes sample responses. If the survey is not available on your computer you can download a zip file containing the survey and the responses here.
- Click on the Snap toolbar to create a chart. The Results Definition dialog appears.
- Select Horizontal Stacked Bar Counts Transposed as the Style. This creates a bar chart showing the proportions of people who selected each response.
- Enter Q6.a TO Q6.e in the Analysis field. This shows the different levels of satisfaction with different aspects of the service.
- Click Transpose so you display the responses by question rather than by value.
- Enter Q1a MONTH=(7 OR 8) in the Filter field.
Q1a is the question asking which date they visited MONTH is a date function which picks the month out of a date as a number =(7 OR 8) compares the month number pulled out by the MONTH function to 7 or 8 (July or August) and keeps the cases where this is true.
- Click the Notes/Titles tab and enter a title such as Satisfaction ratings for July and August.
- Click [OK] to create the chart. It will look something like this:
- Click on the chart toolbar to save your chart.
Step 2: Creating charts showing satisfaction in other months
Create the same chart for the months with the promotion and the months afterwards.
- Click again to open the Results Definition dialog.
- Select Horizontal Stacked Bar Counts Transposed as the Style if it is not selected.
- Click the button at the right-hand end of the Analysis field and select Q6.a TO Q6.e in the drop-down list of recent entries.
- Check Transpose.
- Enter Q1 MONTH=(9 OR 10) in the Filter field. This only uses data gathered in September and October.
- Change to the Notes/Titles tab and enter a suitable title.
- Click [OK] to see your chart.
You can see that the levels of satisfaction have improved.
- Repeat for another chart but enter Q1 MONTH=(11 OR 12) in the Filter field to show November and December.
- You can see that the levels of satisfaction have deteriorated slightly.
Step 3: Creating a list of people who have made comments
Create a list of comments, together with the demographics of the person making the comment.
- Click the on the Snap toolbar to open the Results Definition dialog for a list.
- Enter case, Q8, Q9, Q10 in the Analysis field. This tells Snap you want the list to show the case number, the comment, and the gender and age of the respondent.
- Enter Q11 OK in the Filter field. This specifies that you only want to see cases where a comment has been entered. (You could also use NOT Q11 NR to specify cases which do not have a “No reply” to Q11.)
Note that you can use capital or lower case letters for question numbers in the Analysis and Break fields.
- Click [OK]. The list is displayed. You can see from the case numbers that cases have been omitted if they do not include a comment.
You can also use filters when
- exporting data and displaying data in the survey summary: see Browsing case data using a filter.
- in survey reports: see Filtering a report
- specifying what data to use in a derived variable, see Example of setting up a variable for a complex filter.
For information about using date and time expressions in filters, see the topics Date Functions and Time Functions. Note that you can use the standard filter operators to compare dates and times as well as using the special functions.
If there is a topic you would like a worksheet on, email to email@example.com