Help Center

# Calculated Questions

Calculated Questions calculates a result on behalf of previous answers in the form, and inserts the results into your form. Calculated questions uses a combination of previous question answers and constants in a formula to calculate a value

You can use answers from both Slider and Number questions to calculate answers in regular forms.

In Score forms you can use answers from: Slider, Number, Yes/No, Smiley, and Multiple Choice. You will be required to assign a value to each possibility in a possibility question, the question reference will then use the value associated with the selected possibility

To create Calculated Questions:

1. Choose Calculated in Question Type.
2. Under Answer Specification, type in the formula that you want to use for calculation. When choosing the questions, you want to include for your formula, use eg. Q1 for Question 1.
3. If the question is in a correct format (number or slider) the question will be highlighted in blue to mark that SMART-TRIAL has included the question in the formula.
4. Press Verify Formula.
5. If the formula is valid, a green text will appear under the formula and the formula is now ready to be used in your form. The calculation will be shown in the form the same way a question is shown, and the answer to the calculation will appear as soon as the questions used in the formula have been answered.

When questions are used in a formula, i.e they are blue, there is a link between the question and the formula. It will automatically update the question number should you want to change the order of the questions in the form.

Calculated questions do not work in Inclusion/exclusion forms

 Operator Function Example + Addition Q1 + Q2 - Subtraction Q1 – Q2 -2 / Divide Q1/(Q2+1) * Multiply Q1*4 ^ To the power of Q2^4 Comparators == Equals, if the two values are the same will evaluate to TRUE, if not evaluates to FALSE. Can be used as condition in IF and ternary operator Q1==5 != Not Equal, if the two values are NOT the same it will evaluate to TRUE, else to FALSE. Can be used as condition in IF and ternary operator Q2!=Q1 >= Greater than or equal Can be used as condition in IF and ternary operator Q2>=3 <= Less than or equal Can be used as condition in IF and ternary operator Q5<=Q1 < Less than Can be used as condition in IF and ternary operator Q1 Greater than Can be used as condition in IF and ternary operator 2>Q1 Constants PI PI, evaluates to: 3.141592653589793 PI + 1 = 4,14 E Eulers number, evaluates to: 2.718281828459045 E^2 = 7,389

Available expressions:

Does not support implicit multiplications e.g.: 3(Q1) instead use 3* Q1.

Fractions need a leading number e.g: 1/4 is OK, .25 is not.

Calculated questions do not work in Inclusion/exclusion forms

#### Calculated Questions in SMART-TRIAL:

The layout of the calculated question above will be as seen in the picture below. Here the height and weight have been entered and the BMI has automatically been calculated and inserted into the BMI question field. When exporting the data, the BMI will appear in the export the same way as the rest of the data. 