How do I create a dynamic question based on the number of items I have listed for the question? | XM Community
Question

How do I create a dynamic question based on the number of items I have listed for the question?

  • 16 June 2020
  • 6 replies
  • 229 views

I am creating a rank order question, were the participant needs to rank the items on a scale from 1 to X. X represents the number of items listed for the question. The item list is generated based on display logic from the previous question which is a matrix. So it is step up like this:
(Matrix Question) Q1. How often to you watch the following tv shows:
CatDog Never, Occasionally, A Lot, All the Time
Doug Never, Occasionally, A Lot, All the Time
Save by the Bell Never, Occasionally, A Lot, All the Time
Bob's Burgers Never, Occasionally, A Lot, All the Time
(Dynamic Question) Q2. Please rank the follow from your most watched (1) to your least watched (X):
Listed will be the shows that were selected in Q1, except for those that received the "never" response.
So, if in Q1 you selected CatDog = Never, Doug = A Lot, Save by the Bell = A Lot, and Bob's Burgers = Occasionally, then in Q2 you would only see Doug, Save by the Bell, and Bob's Burgers.
How do I get the question to say 1 through 3, instead of always being 1 to 4?


6 replies

Userlevel 7
Badge +27

Assuming you have force response on Q1, on Q2 you can use Carryforward - Unselected Statements for Never from Q1. You should also add display logic to Q2 to only display if Q1 Never count is less than 4.

I got the logic display, and I have the items being displayed as needed. I even have if they mark all the statements as "never" to skip the next question. I just want a more customize question for Q2.
If in Q1 of the 4 statements, 3 are selected to be greater than "never", then how do I get Q2 to read "Rank the following from most watched (1) to least watched (3):"
Or...
If in Q1 of the 4 statements, 2 are selected to be greater than "never", then how do I get Q2 to read "Rank the following from most watched (1) to least watched (2):"
...
I have more than 4 statements in Q1, there are 16. What I do not want is to have the participants rank shows they never watch, or have a questions that states rank from 1 to 16 when there are only 10 options.

Userlevel 7
Badge +27

You can use arithmetic to pipe the correct number into your question text. Something like:
...least watched ($e{ 16 - q://QID1/SelectedAnswerCount/1 }):
where QID1 is the the QID of Q1 and /1 is the first answer "Never"

This gets me an invalid response.

Please rank the following social media platforms from your most used (1) to least used ($e{ ( q://QID29/SelectedAnswerCount/3 ) + ( q://QID29/SelectedAnswerCount/4 ) + ( q://QID29/SelectedAnswerCount/5 ) + ( q://QID29/SelectedAnswerCount/7 ) }):

Userlevel 7
Badge +27

https://www.qualtrics.com/community/discussion/comment/26848#Comment_26848Not sure what you are trying to do, but you only have 4 scale points so /5 and /7 would be invalid.

I have 5 but I was shorting things so I did not have to type everything out.
When I use your formula (e.i. $e{ q://QID1/SelectedAnswerCount/1 } ) and change the numbers this is the response I get if I select one item for "Never", two items for "Less than Monthly", three items for "Monthly," four items for "Weekly," and five items for "Daily."
/1 = 1
/2 = Invalid
/3 = 2
/4 = 3
/5 = 4
/6 = Invalid
/7 = 5
I am trying to get a count of all the responses that are not "Never" and put that number in my question.

Leave a Reply