Computed Questions

A computed question is not asked; instead, its value or response is computed from a formula which uses other questions, constants and system variables. Its value is intended for later use. Its possible applications are:

You create a computed question exactly as you do a regular question, however you specify an IF Condition for a complex skip whose destination must be an asterisk (*), which means: skip to next question in any case. You then enter a computation formula rather than a skip condition, the syntax rules of which are the same.

Example 1

Suppose that we have the following two questions, Q23A and Q23B, asking for the quantity and frequency of consumption of some XYZ product:

Q23A:

How much XYZ do you drink ?

mask:

$E

choice:

99 skip to +3 Refusal

 

 

Q23B:

Note the frequency

choices:

01 Daily

 

02 Weekly

 

03 Monthly

 

04 Yearly

Suppose now that we would like to express the combined response to these two questions in terms of annual consumption. We create question Q23C and perform the calculation:

Q23C:

Yearly consumption of product XYZ

skip to *

 

if

Q23A * PRJ (Q23B, 365, 52, 12, 1)

A computed question which does not have response choices can only have a value. However, if it does have response choices, the system will look for a match between its computed value and one of its own response choices. If a response code matches the computed value, it will be selected.

Example 2

In the following computed question, one of its response choices will be picked dependent on a computation involving a previous question:

Q3:

Frequency of visits

 

mask:

$E

 

skip to * if

IF((NOT Q2 = WR), MIN (3,Q2), 99)

 

no

Code

label

1

01

Once

2

02

Twice

3

03

Often

4

99

Don't know

If there was a coded response to Q2, then Q3 will take a value of 3 or less, and the corresponding code will be picked. If there was no response to Q2, then Q3 will take a value of 99, and the code 99 will be picked.

Important: