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

How to incorporate a dummy variable while writing a survey?

  • 30 August 2019
  • 6 replies
  • 171 views

Userlevel 2
Badge +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
icon

Best answer by LibertyW 31 August 2019, 01:20

View original

6 replies

Userlevel 4
Badge +5
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
Userlevel 2
Badge +5
@Libertywick, thanks. I followed the steps and added the branch and embedded data. Now how do I check if this works? Thanks.
Userlevel 4
Badge +5
@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)
!
!
Userlevel 2
Badge +5
@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
Userlevel 4
Badge +5
To check what the value of your variables are, you can add a debug screen like so: !
Userlevel 2
Badge +5
Thanks @Libertywick .

Leave a Reply