Piping

Expressions

Calculate with answers: arithmetic, comparisons and conditional text.

Expressions use the {{e: … }} marker and can do arithmetic, comparisons and conditionals.

Sample answers
v:name
v:score
v:visits

Respondent sees

You are a promoter.

CategoryOperators
Arithmetic+ - * / % **
Comparison> < >= <= == !=
Logic&& ||
Conditionalcondition ? ifTrue : ifFalse
  1. Add Expression opens the calculation editor.
  2. Choose a supported function, such as avg().
  3. Insert numeric answers as the function inputs, separated by commas.
Local documentation example.

Function reference

Functions take numbers or numeric answer references. Separate multiple inputs with commas.

FunctionExampleResult
avgavg(4, 5)4.5
sumsum(4, 5)9
minmin(4, 5)4
maxmax(4, 5)5
roundround(4.56)5
floorfloor(4.56)4
ceilceil(4.12)5
absabs(-3)3

round, floor, ceil and abs use one input. To round to two decimal places, use round(value * 100) / 100; a second argument does not specify the number of decimals. Use parentheses to make calculation order explicit, especially when combining powers with other operations.

Types and missing values

Use a numeric answer or extractor for calculations. + joins text when either input is text, so "4" + 5 produces 45, while sum("4", 5) converts numeric text and produces 9. Comparisons and conditions can also use numbers, quoted text and true / false.

A missing source is not automatically left out of a calculation. Preview blank inputs, zero and any path that skips the source. Division by zero is invalid. The field editor validates expressions; an expression that cannot be evaluated may appear as an empty result.

Both sides of && and || are evaluated. To guard a calculation such as division, use a conditional: v:count != 0 ? v:total / v:count : 0, with the real references inserted by the picker.

Worked guides

Advanced piping

Essential

Add calculated expressions and pipe values into numeric fields.

Compare plans