Intuify

Intuify

Documentation

Question types2 min read

Calculated Variables

Work out a number from answers and global variables; NA when an input is not a number.

On this page (2 sections)

Calculated Variables is an invisible question that works out one number from earlier answers and global variables. The respondent never sees it. It is the question form of the Calculation flow block, and a flavor of Create / Edit Global Variables.

Adding one#

  1. In the question palette (Specialized group) add Calculated Variables.
  2. Click Edit formula, pick or name the result variable and build the formula. Click an input to insert it.
  3. The card shows ResultVar = formula. The builder flags a missing variable or formula, or a formula with a syntax error.

How inputs become numbers#

A Calculation works out a number from answers and global variables and stores it in a result variable. Add one from the Flow tab (the Calculation block) or as a Calculated Variables question from the question palette. Pick the result variable, open the formula editor and click inputs to insert them.

Every input is turned into a number first:

You useTokenCounts as
Single selectanswerThe answer's recode value (set it in the question's recode settings)
Multiple selectone Choice per option1 if picked, 0 if not
Number, slider, rating, short textanswerThe number typed or chosen; empty or non-numeric text is not a number
Gridone Row per rowThe selected column's recode value, or the number typed in that row
Rankingone Rank per itemThe item's position, 1 being first
Global variablevariable nameThe number it holds

If any input cannot become a number, the result is NA. This differs from the Formula operation of Create / Edit Global Variables, which keeps the variable's old value when it cannot compute; a Calculation always replaces it, so an old number can never pass for a fresh one. Alongside the result the survey keeps a record of the formula, the numbers used and any error (a variable named __calc.<YourVariable>) that does not appear in Display Global Variables.

Word import/export and the AI assistant do not know about Calculations yet.

Was this page helpful?