How to Filter survey data based on which case scenario participants responded to
Hi there,
Our survey consists of questions based on a case scenario the participant is given. There are three possible case scenarios that are set up to be randomised. I was wondering how I can filter responses based on which case scenario (e.g. Case Scenario 1, Case Scenario 2, Case Scenario 3) they read. I’m sure it would have to do something with adding a ‘Embedded Data’ block in the survey flow, but I’m not sure how to do this or what to type.
Any tips would be a big help
Thanks!
Page 1 / 1
Hi @minnie_mouse456 ,
You can add embedded data “Scenario” with each Case Scenario as a group in Survey Flow.
When the group is randomly selected, “Scenario” will take a value before showing the respective Case Scenario block.
Then, in the Data & Analysis tab, you can create filter by embedded data “Scenario” to be equal to value.
For example,
If group 1 got randomly selected, “Scenario” will be 1. Similarly for the other scenarios with values 2 and 3.
In Data and Analysis tab,
For Scenario 1, add filter, select field as Embedded data “Scenario” is 1. Continue creating the other 2 filters for the remaining scenarios with values 2 and 3.
Feel free to change “Scenario” name and value to your preferred naming and values.
@Chee Heng_SZ
Thanks so much for the reply!
I didn’t make this survey, so unsure how it was created. But my survey flow looks like this.
Is there a way to ensure the embedded data works in this way?
Hi @minnie_mouse456 ,
Based on your screenshot, your survey likely uses “Question Randomizer” for the Case Scenarios block in the survey builder instead of “Randomizer element” in Survey Flow.
You can try to amend the survey to use the survey flow by disabling the “Question Randomizer” and adding the various components like my screenshot above.
minnie_mouse456 wrote:
Is there a way to ensure the embedded data works in this way?
Perhaps there may be a way to use JavaScript to set embedded data, but I am may not be able to that solution as I don’t really use custom codes.
Update:
Add embedded data “Scenario” in survey flow.
Add the code below to javascript for Case Scenario 1 and paste similar code to Case Scenario 2 and 3 with the value change from 1 to 2 or 3.
Qualtrics.SurveyEngine.addOnload(function() { /*Place your JavaScript here to run when the page loads*/ var Scenario; Qualtrics.SurveyEngine.setEmbeddedData('Scenario', 1); });