July 30, 2020 The BMS lab

Calculated variables

Quick guide

Calculated variables are made up of the answer on an item and then used to direct a participant to a specific module. Therefore you have to start with making the items for the calculated variable.

By using the Calculated Variable function, you can create an equation based on a list of functions provided by CC and BODMAS.  

In turn, you can show these calculated variables on the feedback website. For this you will need to create a feedback template.

Create Calculated Variables

Step 1.

On the left menu click on modules. Open your module and go to content items. Calculated Variables will only work with certain inputs including the numerical (Number input, number slider, number dropdown, and number choice), and some character-based options (dropdown, yes-no, multiple choice, likert scale). In CC the item type ‘number choice’ is most commonly used, with a scale of 1 to 7. This is because the scale of the graphs that we use on the feedback website to show the calculated variables are fixed from 1 to 7.  

In the chosen item preview menu, click on ‘Used for numeric Calculation’ and click on save.

Step 2.

In the left menu go to the calculated variables tab. On the page click on the “Add a calculated variable” button. Here you can give you variable a unique name, a short description and you can input your equation. You can create an equation using the functions and BODMAS.

Functions explained


  • + will give the addition of variables.
  • – will give the subtraction of variables.
  • * will give the multiplication of variables.
  • / will give the division of variables.
  • ^ will give the exponential value of a number.
  • SUM_ANS(variable1) will give the different responses of all participants of the variable and sum them.
  • NUM_PS(variable1) will give the total number of participants for an indicated variable. Example: three participants are assigned to an intervention, this function will return 3.
  • NUM_P_ANS(variable1) ill give the number of participants who answered the indicated variable. Example: three participants are assigned to an intervention, two gave an answer. This function will return 2.
  • MODE_ANS(variable1) will give the most responded number of the indicated variable. If there is no mode this function will return the average.

Using calculated variables as feedback

You can use the calculated variables as direct feedback within your module. If you want to use the feedback website after the participant has answered all your questions, see the ‘feedback templates’ page.

Step 1.

To be able to show the calculated variable you should first make a new module. Then go to content items and create a new item, the item type does not matter for this.
Click on dynamic text, a pop-up screen will appear.

Step 2.

Click on ‘select a calculated variable’, a dropdown list will appear. Select your calculated variable and click on ‘ok’. A code will now appear in the preview screen. This code will show a number once the items used for the calculated variable are filled in the by the participant.