# Unit Analysis

How to keep track of Units when creating a Calculation

Last updated

How to keep track of Units when creating a Calculation

Last updated

Overview

The Calculation page analyses the Unit of your Calculation as you are creating it. This helps you check your Calculation for logical consistency, and provides clues to the Unit of Variables required to finish your Calculation.

The Calculation page shows two or three items:

Worked Example

In this example, we are creating a Variable called `Gym Revenues`

, which is equal to `Gym members * Revenue per member`

.

`Gym Revenues`

has a Unit of `GBP`

.

Step 1

To begin with we have an empty formula. **Target Unit** shows our desired Unit (`GBP`

). **Current Unit** shows that the Calculation is not currently valid. **Remaining Unit** shows that if we reference a Variable with Unit `GBP`

we will have the correct Unit.

Step 2

We enter a reference to `Gym Members`

. This updates the **Current Unit** to `Member`

, and alerts us that `Member`

does not match the **Target Unit** of `GBP`

. We have not entered an operator, so Models cannot determine the **Remaining Unit**.

Step 3

We enter a `*`

(multiply) operator. Models can now work out that we need to reference a Variable with Unit `GBP / Member`

in order to arrive at the Target Unit, as **Current Unit** * **Remaining Unit** = **Target Unit**.

Step 4

We add a reference to the `Revenue per member`

Variable, which has Unit `GBP / Member`

.

The **Current Unit** now matches** **the **Target Unit**.

At this point, if we click on the **Add Variable Reference ** button in the Calculation Part list, we will be shown only Variables that match the Remaining Unit of `GBP / Member`

.

**Target Unit**

The Unit of the Variable in which we are creating the Calculation.
*Note: If you haven't defined a Unit for the Variable, this will be guessed based on context*

**Current Unit**

The Unit currently produced by the Calculation. This item will show warning messages if a Unit cannot be determined.

**Remaining Unit**

The Unit required to finish the Calculation with the Target Unit.
The remaining Unit will only be shown if the entered formula is empty ends in an operator (`+`

, `-`

, `/`

, `*`

).