How to set conditional scoring in embedded data? | XM Community
Skip to main content

I have a series of questions that have multiple point values depending on the answers selected and the order that they were selected in. Say for example I ask the multiple choice question "What color...?" twice and Red = 1, Blue = 1, and all other choices = 0, but if the participant answers the first question "Red" and the second question "Blue" they get an extra point.
I'm thinking a solution to this might be setting embedded data for this such as "Score" = "3" IF $(QID1/SelectedChoices) = $(QID1/RedResponse) AND $(QID2/SelectedChoices) = $(QID2/BlueResponse)
Would this format be valid? I'm not an expert in JavaScript so there may be better ways to write this. Open to all ideas!
P.S. This isn't my survey so I can't change they format of the questions or how they're answered, only the scoring options.

Hi seanmcfarland
Can you please elaborate on what score you need to assign for each choice and also for what condition you need to implement it.
According to my understanding I have posted a screenshot below.
image.png


If Javascript doesn't work out, you can use branching logic in Survey Flow.


https://community.qualtrics.com/XMcommunity/discussion/comment/54547#Comment_54547I ended up doing this to avoid making any script mistakes and it worked well. If anybody comes across this thread with a similar question I'd be happy to walk you through the steps!


Leave a Reply