Expressions help you to evaluate the respondent, based on the answers provided by them. You can create a mathematical formula using Expressions and show the results in the Thank you page. You can also see the calculated values in reports.
For instance, you want to calculate the quality score of a particular process in your organization. You can enable scoring for each answer and use Expressions to calculate the results based on the Mathematical formula you had defined.
The following question types support Expressions:
- Opinion scale
- Multiple choice
- Picture choice
Expressions lets you control the survey flow when used with display logic, skip logic or question piping. See the calculated value only in your reports by keeping it a hidden variable or use it as a filter value to get value-driven reports.
Note: The Expression value cannot be calculated if the respondent skips (using Logic or optional questions) any question that is used to calculate the expression. Please ensure skip and display logics are used carefully while applying expressions.
Let’s see how it works:
1.Click on the global variable icon from the top bar. A pop-up window will open. Select Expressions tab and click on Create Expression button.
2. Give a name to the expression and add formula you want to execute during the survey. You can add the variables by clicking on the dollar ($) sign.
3. Click on Validate and save button to save the created expression. All Expressions created for the survey will be listed in the same pop-up window.
Once you have finished adding expressions, go to the questions that you want your expressions to be used. You have three options- Display logic, Skip logic, and Question piping. Choose the one that suits the mathematical operation you want to employ. For this example, if you are using Display logic.
- Select logic and select the expression that you want to use.
- Add the desired condition for the responses.
3. Preview the questions and proceed
You run an e-commerce platform and want to reward your customers with 10% of cashback, based on the value of their purchase.
1. Using a multiple choice question type or any other question type that can have numerical responses, you can display the products you have.
Note: In case of multiple choice question type, assign the price of the product as a score to each of the choices.
2. Now open expressions window by clicking on the globe icon. After naming the expression appropriately, put down the formula using the variables from the drop-down menu.
3. After defining in the formula - 0.1 * (Answer.Q9 + Answer.Q10 + Answer.Q13), update the expression window and proceed.
4. You can display the eligible cashback amount in the final page using Display logic, skip logic or question piping.
Note: Expressions can only run numerical values which means, you can use the feature only for numerical responses or the ones that can be assigned scores.