Skip to content
  • There are no suggestions because the search field is empty.

Assign Values to Text Responses and Calculate a Total Score

Scoring Text-Based Survey Responses with Custom Variables

Some surveys ask participants to select a text-based response, such as Very Satisfied, while the study team needs to assign that response a numeric value, such as 4, for scoring and reporting.

When using Custom Variables, the selected text response cannot be directly converted into a numeric value within the same variable. To calculate a score, you will need to create separate Custom Variables for the text response and its corresponding numeric value.

This tutorial article explains how to:

  • Collect text-based survey responses
  • Convert each response into a numeric score
  • Calculate a total score across multiple survey questions
  • Store both the selected responses and numeric values using Custom Variables

This workflow can be used for patient satisfaction surveys, assessments, screening tools, and other surveys that require response scoring.

Steps to Implement:

1) Create 2 custom variables for the question. One single select variable to capture the responses in words and one to capture the responses as a number. 

2) In your survey, create a radio group question and tie it to the single select custom variable. This will be the question the participant selects on the survey.

3) Create a single-line input question, change the input type to a number format, then link it to the number version of the custom variable. Make this question invisible.

Pro Tip:  You can organize related questions in a panel to keep them visually organized. This also makes it easier to replicate. Simply copy the whole panel when you need to create additional question in a similar format.

4) Create a survey logic statement for each response option in the text version of the question to set the numeric value in the hidden question.

Make sure you include a logic statement for an empty value. This will help ensure your logic statements are triggered again if the respondent changes their answer.

5) Create a number type custom variable for the total score. 

6) Add an Expression type question to your survey and link it to the total score variable. 

7) Enter a calculation to add each of the score values. Make sure you enclosure each question name in curly braces { }.