How to incorporate a dummy variable while writing a survey? | XM Community
Skip to main content
Solved

How to incorporate a dummy variable while writing a survey?

  • August 30, 2019
  • 6 replies
  • 335 views

Forum|alt.badge.img+5
  • Level 1 ●
  • 22 replies
Hi Community, I am writing my survey. I have to incorporate two dummy variable, which go like this: If Question 2 = A or Question 3 = B, C then dummy variable 1 If Question 2 = B or Question 3 = A, then dummy variable 2 These two dummy variables will then be used in later questions. How do I add these dummy variables while I am writing the survey? Please note: I haven't started collecting responses yet, so I have no responses for my survey. Thanks, Ank

Best answer by LibertyW

@ank you can add a block with your variables to see if they are being assigned correctly like so... (the second image is in html view) ! !

6 replies

LibertyW
Level 3 ●●●
Forum|alt.badge.img+5
  • Level 3 ●●●
  • 95 replies
  • August 30, 2019
Unless I am oversimplifying your question, this can be done by using a branch and embedded data field in the survey flow. Branch states question answers (e.g. Q1 A is selected OR Q3 B is selected) then embedded data field is "dummy1" = 1. then create a branch and em data set for dummy2

Forum|alt.badge.img+5
  • Author
  • Level 1 ●
  • 22 replies
  • August 30, 2019
@Libertywick, thanks. I followed the steps and added the branch and embedded data. Now how do I check if this works? Thanks.

LibertyW
Level 3 ●●●
Forum|alt.badge.img+5
  • Level 3 ●●●
  • 95 replies
  • Answer
  • August 30, 2019
@ank you can add a block with your variables to see if they are being assigned correctly like so... (the second image is in html view) ! !

Forum|alt.badge.img+5
  • Author
  • Level 1 ●
  • 22 replies
  • September 5, 2019
@Libertywic, thanks. In the Survey Flow I created a Branch logic followed by an Embedded data before the block began. And before the question itself, I added a display logic, with 1. Embedded Data--> 2. Field name (as Dummy1, which I had also added as Embedded data on top of Survey Flow)--> 3. is Equal to--> 4. Values : Here I wrote ${e://Field/dummy1}. This is working. Thanks again. Please confirm if the above mentioned steps that I have done to create dummy variable is correct. Thanks, Ank

LibertyW
Level 3 ●●●
Forum|alt.badge.img+5
  • Level 3 ●●●
  • 95 replies
  • September 5, 2019
To check what the value of your variables are, you can add a debug screen like so: !

Forum|alt.badge.img+5
  • Author
  • Level 1 ●
  • 22 replies
  • September 9, 2019
Thanks @Libertywick .