Compute percent using a range and a set of discrete values

0     1     Edited May 18, 2016 by Anonymous

How would you compute the percent of respondents where (q1 is between 1 and 5) or (q2 equals 2)?


Comments

0

Rob Smith May 18, 2016

You could write it like this:

pctin((q1 >= 1 and q1 <=5) or q2==2, true)

Or you could use the inrange function:

pctin(inrange(q1,1,5) or q2==2, true)  

You're basically saying: compute the percent of records where ((q1 is within 1 and 5) or (q2 equals 2)) is true.

Leave a Comment

Please sign in to leave a comment.