Piping
Calculate scores with piping
Build totals, averages and weighted scores from earlier answers.
Use an expression to show a calculated result in a later question or content block. For example, combine two workshop ratings into a short summary before the thank-you screen.
Average two ratings
Collect compatible numbers
Add two Number questions: clarity and usefulness, each with a minimum of 1 and maximum of 5. Make both required if the result needs both answers.Add a summary
Add a Content block after both questions and open the description's field editor with{ }.Build the expression
Use the earlier-question picker to insert the two answers inside an expression, and wrap them in avg(...) separated by a comma.Preview the result
Answer 4 and 5. The summary should show 4.5. Repeat with both answers at the minimum and maximum.- Add Expression opens the calculation editor.
- Choose a supported function, such as avg().
- Insert numeric answers as the function inputs, separated by commas.
The examples below use readable IDs. In your survey, insert the real references with the picker; typing these example names will not connect them to your questions.
| Calculation | Expression | For clarity 4 and usefulness 5 |
|---|---|---|
| Total | sum(v:clarity, v:usefulness) | 9 |
| Average | avg(v:clarity, v:usefulness) | 4.5 |
| Usefulness counts twice | (v:clarity + v:usefulness * 2) / 3 | About 4.67 |
| Round to one decimal | round(avg(v:clarity, v:usefulness) * 10) / 10 | 4.5 |
| Reverse a 1–5 score | 6 - v:clarity | 2 |
Put the expression inside the {{e: … }} marker. Choose a numeric answer for a Likert statement;
a label such as “Agree” cannot be averaged. Numeric option attributes
can supply scores attached to choices; keep all values consistently numeric and check each option.
Avoid misleading scores
Piping displays a calculation; it does not automatically create a new answer column or a validated research scale. Keep the scoring rule clear, combine compatible measures, and calculate a separate analysis variable in your exported dataset when needed.
Missing answers are not automatically excluded from averages. Test them explicitly and provide the intended fallback, or require the inputs. Also check division by zero and whether zero is a valid answer.
Advanced piping
EssentialAdd calculated expressions and pipe values into numeric fields.
Compare plansSee all expression functions and missing answers.