How do I recode a hidden variable based on a previous question? | XM Community
Skip to main content
Hi,



I would like to grab the respondent's answer to the 'Which province/territories do you currently reside in?' and recode a hidden 'region' variable based on their response (e.g. British Columbia and Alberta are coded as West and Nova Scotia and PEI are coded as Atlantic and so on) . How do I implement this?



TIA
you can create embedded variable in survey flow and punch on basis of branch logic.
Do you have sample code? I have only been using Qualtrics for a week and we are transitioning from Confirmit.



Let's say Q1 is the province question and the answer selection plus their code is as follows:



0 - British Columbia

1 - Alberta

2 - Nova Scotia

3 - PEI



Q2 is the hidden region variable with:

1 - Atlantic

2 - West



How can I punch as 1 for Q2 if the respondent selects 2 or 3 at Q1?

Leave a Reply