Combining literal responses with a coded question
- Click
to display the Variables window.
- Click
to add a new variable.
- Specify the Variable Details:
- Name: V2
- Label: Items ordered
- Type: Derived (the variable will derive its data from existing variables)
- Response: Multiple (each respondent could fall into more than one of the new codes)
- Specify the Code Details:
![Derived variable matching a code value to a label](https://www.snapsurveys.com/support-snapxmp/wp-content/uploads/2020/10/openendedliteral6-png.png)
- Ensure that the variable from which the derived one will gather its data has a relevant pattern applied, such as lower case.
-
Click
to save the variable. The variable can then be used in tables and charts in the usual way.
![Table showing the counts of the Items ordered](https://www.snapsurveys.com/support-snapxmp/wp-content/uploads/2020/10/openendedliteral7-png.png)
Unless a pattern has been applied to the source variable, the specification of the text string must be precise. The pattern match process searches for an exact match (i.e. it is case sensitive) and looks for a capital M at the beginning of the word Milkshake and ignore lower case m. Q4a=”ilkshake” would find both.