Terminate if all categories selected on a previous question was selected on the current question | XM Community
Skip to main content
Solved

Terminate if all categories selected on a previous question was selected on the current question

  • July 27, 2020
  • 3 replies
  • 13 views

Forum|alt.badge.img+6

I have 4 questions in a survey. An occupation question, province question, an age question and a category purchased question.
Occupation:
Do you work for...?

  1. market research company

  2. media group

  3. advertising company

  4. home improvement store

  5. pharmacy store

  6. liquor store

  7. none of these

Province:
  1. Alberta

  2. Quebec

  3. Ontario

  4. None

Age:
  1. Under 18

  2. 18

  3. 19

  4. 20-34

  5. and so on

Category purchased:
  1. pharmacy

  2. liquor

  3. home improvement

  4. none

How can I determine if a respondent works (occupation) in all categories that they selected in the 'category purchased' question so I can screen them out?


Best answer by SurajK

Hi rarcega ,
You can compare the selected choice recode of both the questions and terminate. Create 2 embedded variable and pipe the selected choice recode in it and after that using the branch logic compare if both are same then terminate. See below,
image.png

3 replies

SurajK
QPN Level 3 ●●●
Forum|alt.badge.img+4
  • QPN Level 3 ●●●
  • Answer
  • July 27, 2020

Hi rarcega ,
You can compare the selected choice recode of both the questions and terminate. Create 2 embedded variable and pipe the selected choice recode in it and after that using the branch logic compare if both are same then terminate. See below,
image.png


Forum|alt.badge.img+6
  • Author
  • Level 2 ●●
  • August 5, 2020

So for this to work, the recodes for the category purchased should be the same as the occupation question? For example, occupation is 5 for pharmacy and therefore it should be 5 for pharmacy on the category purchased question too?


SurajK
QPN Level 3 ●●●
Forum|alt.badge.img+4
  • QPN Level 3 ●●●
  • August 5, 2020

Yes, that's correct. Ideally we should keep the recode values same for the similar option throughout the survey.