To view video Click Here

To **create a calculation** you first need to **create a ‘Variable’**. This is basically a **name you give to a value**.

**How to create a variable **

- Navigate to the
**Template builder**of a**new**or**existing template**. - Ensure the template is in
**draft mode**. - On the left panel scroll to the bottom and select the “
**Create Variable**“. - In the modal enter in the
**name**you wish to give and give it a**value**. - Select “
**create**“.

PLEASE NOTE:If you wish to simply give the variable a value based on a calculation simply give it a value of 0. If you wish to use the variable in a calculation, then give it the appropriate value |

**How to create a calculation**

- Navigate to the
**Template builder**of a**new**or**existing template**. - Ensure the template is in
**draft mode**. - On a requirement select “
**Add Calculation**“. - Select the
**Variable**you wish to assign to this calculation. - Select either
**Variable**,**Score Weight**,**Input Field**or**Value**. - A second box appears if you select
**Variable**,**Input Field**or**Value**, fill in the second box by either selecting a**Variable**, selecting a**Input Field**or inputting a numerical digit in the box if you select “**Value**” . - Select “
**Add logic**” if you wish to conduct a calculation with the option selected. - Select either “
**+**“, “**–**“, “**×**” or “**÷**” . - Now select the item either
**Variable**,**Score Weight**,**Input Field**or**Value**again in order to complete the**calculation**. - Press
**save**.

An** example** of a very **simple calculation** is seen below

**Variable 1** is **equal** to **score weight** **+** **example field**. This means that **Variable 1** will now **equal** the **weight of the score selected** during the conducting of the audit + the **value** inputted into the **numeric input field**. If the user selected a **score of yes**(which has a **weight of 10**) and **entered 3 **into the **input field **(**Example Field**), then **Variable 1** will now **equal 13** .

In the **second calculation** **Variable 2** is **equal** to **Variable 1 × 0.89**, so even though **Variable 1** was **set up with a value of 6.54**, as the **first calculation changed the value of Variable 1**, the calculation now reads **Variable 1(13) × 0.89**. **Variable 2 **now **equals 11.57**.

PLEASE NOTE:The calculations are completed in order |

**Calculation Based Grading**

The new Calculation Based Grading is a way to grade a assessment based on the calculations.

This grading is very much like the Rules Based grading and uses logic to decipher which grade to give it

Here you can see that you select a **Variable**, then an **operator** from the selection below

- Less than
- Greater than
- Equal to
- Less Than or Equal to
- Greater than or Equal to

Then you select a **field**, this field can either be a **Variable** or a **Value**.

You can also add another set of conditions by selecting “**Add calculation**” once you do this you get the option to select **AND** or **OR** .

If you want both of the rules to be true for the grade to be selected then you use **AND**.

If you only need one of them to be true then you select **OR** .

An example of this is below

In this example, I am using 4 variables to check if the weight and width of an object is within the correct parameters. If it is not then it won’t pass, and it will check to see which grade it should fall in to.