This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help

Next Topic

Book Contents

Book Index

Filter expressions

Filter expressions are logical Boolean expressions. The general format of filter expressions is:

operand operator operand

The operand may be:

You may also apply a pattern to the operand, for example, to search for dates within a specific range

The operator must be one of the following:

Symbol

Text

Meaning

Example

Meaning

=

MT

match

Q2=1

To select respondents who have given answer 1 to question 2. (If question 2 is a Multiple Response question they may have given other answers as well).

==

EQ

exact match

Q4==1

To select respondents who have given only answer 1 to question 4. If question 1 is a Multiple Response question they must have given no other answer in addition to answer 1.

>

GT

greater than

Q5 GT 50

Q5>50

To select only respondents who have given a value of greater than 50 at question 5.

>=

GE

greater than or equal to

Q5 GE 50

Q5>=50

To select only respondents who have given a value of greater than or equal to 50 at question 5.

<

LT

less than

Q5 LT 50

Q5<50

To select only respondents who have given a value of less than 50 at question 5.

<=

LE

less than or equal to

Q5 LE 50

Q5<=50

To select only respondents who have given a value of less than or equal to 50 at question 5.

Items or expressions may be grouped together using the following operators

,

OR

or (any of the items separated by , or OR)

Q2=1 OR Q2=2

Q2=1,Q2=2

Q2=(1 OR 2)

Q2=(1,2)

To select only respondents who have given answer 1 or answer 2 to question 2.

~

TO

or range: any item in the range between the two terms separated by ~ or TO

Q2=(1 TO 3)

Q2=(1~3)

To select respondents who have given answers within the range 1 to 3 to question 2. (1 or 2 or 3).

&

AND

and: both the terms separated by & or AND

Q2=1 AND Q4=1

Q2=1&Q4=1

To select respondents who have given answer 1 to question 2 and also given answer 1 to question 4.

!

NOT or UNLESS

not: all cases not included in the following expression

NOT Q2=1

UNLESS Q2=1

!Q2=1

To select respondents who have not given answer 1 to question 2.

Items may be identified using the following operators

#

NUM

the number of replies selected in a multi-response questions

num Q5>3

 

To select only respondents who have given more than three answers to question Q5

 

CASE

the specified case(s)

case >100

All cases after the first hundred

See Also

Filter examples

Content field entries for Data report and data export dialog