display randomly selected N of R choices, where K of the R choices are excluded based on the answer to another question | XM Community
Skip to main content

We have a question, Q02, in which we want to display 5 choices randomly selected from 10 possible choices.

 

Every respondent should see 5 choices.

 

However, for some respondents, one of the 10 possible choices should be excluded based on the answer to a previous question, Q01.

 

So for example, if the respondent answered "boy" to Q01, then the 10th choice of the 10 possible choices is removed before random selection. The respondent would see 5 of the 9 remaining possible choices.

 

How can we implement this? If we gate the 10th possible choice behind display logic, it could still be selected as one of the randomly selected 5 choices, so that some respondents would only see 4 choices.

 

We want to make it so that everybody always sees 5 choices.

You could create two blocks, one with all 10 options and one with just the 9 and then only show the relevant block to those who selected the corresponding option. 


Hi,

Add choice display logic on your nth choice based on answer to question 1.

Something like this :

And choice randomization on your question:

 

The random choices will be selected among those that are displayed. In the above example, if “2” is not selected at Q1, it’ll randomly present 5 choices selected in 1 to 6. If “2” is selected, it’ll randomly present 5 choices selected in 1 to 5.


Leave a Reply