Skip to content
Open fromusers

Formulas

SurveysUsability testsIn-product surveys

Formulas calculate values for computed variables. Use them for scores, segment labels, eligibility flags, and derived text that you pipe or evaluate in logic.

  • Sum or average rating questions into an index.
  • Label participants as a segment with IF.
  • Normalize text with UPPER, LOWER, or CONCAT.
  • Gate follow-ups on a derived flag instead of repeating long conditions.
FunctionPurposeExample
IF(condition, trueValue, falseValue)Conditional resultIF({{age}} > 18, "Adult", "Minor")
AND(condition1, condition2, ...)All conditions trueAND({{age}} > 18, {{country}} = "US")
OR(condition1, condition2, ...)Any condition trueOR({{status}} = "active", {{status}} = "trial")
NOT(condition)Boolean negationNOT({{is_premium}})
FunctionPurposeExample
SUM(number1, number2, ...)Add numbersSUM({{Q1}}, {{Q2}}, {{Q3}})
AVG(number1, number2, ...)AverageAVG({{Q1}}, {{Q2}}, {{Q3}})
MIN(...) / MAX(...)ExtremesMAX({{Q1}}, {{Q2}})
ROUND(number, decimals)Round to decimalsROUND({{score}}, 2)
ABS(number)Absolute valueABS({{difference}})
CEIL(number) / FLOOR(number)Round up / downCEIL({{score}})
FunctionPurposeExample
LEN(string)Character lengthLEN({{name}})
UPPER(string) / LOWER(string)Case transformUPPER({{name}})
CONCAT(string1, string2, ...)Join stringsCONCAT({{first_name}}, " ", {{last_name}})
CONTAINS(string, substring)Substring checkCONTAINS({{email}}, "@gmail.com")
  1. Create a variable with type Computed.
  2. Open the formula editor.
  3. Insert functions and {{variable}} references.
  4. Validate the expression in the editor.
  5. Use the computed variable in piping or conditions.
  6. Preview with known inputs.

Create effort_band from an average of three ratings:

IF(AVG({{ease}}, {{clarity}}, {{speed}}) >= 4, "Low effort", "Needs work")

Then show a deep-dive section only when effort_band equals Needs work.

  • Inputs must resolve before the formula is useful later in the path.
  • Keep formulas readable. Very long nested expressions are hard to maintain.
  • Formula results follow the computed variable through logic evaluation order. See How rules are evaluated.
  • Store intermediate calculations as separate computed variables when reuse helps.
  • Prefer formulas for repeated math instead of duplicating conditions on many questions.
  • Test edge cases: empty answers, zero values, and unexpected text.

Common questions

Where do formulas run?

Formulas power computed variables. The result can be piped into text or used in display and branching conditions.

Can I nest functions?

Yes. For example, wrap SUM inside ROUND, or use IF with AND conditions.

How do I reference other variables inside a formula?

Use piping tokens such as {{Q1}} or {{age}} inside the formula expression.