
Solved
Counting responses from multiple questions
I have a ranking question that I only want to display if a participant selects a specific dropdown item 2 or more times in the previous matrix questions. Since there are multiple questions, I can't use the display logic to count.
!
If they select "Extremely Painful" two or more times, then display the question.
Is there a way to tally up the count from multiple questions? I'm trying to use embedded data (for the first time), but this command doesn't seem to work -
${q://QID1%232/ChoiceGroup/SelectedChoicesCount/4}

Best answer by TomG
@mkosterich,
The easiest way is to do it with JavaScript on a subsequent page and save the count to an embedded variable. Something like the following added to the addOnLoad function:
```
var countExtPain = "${q://QID2%232/ChoiceGroup/SelectedChoicesForAnswer/1}".split(",").length;
Qualtrics.SurveyEngine.setEmbeddedData("countExtPain", countExtPain);
```
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.