### Virtual variables overview

Virtual variables serve as the next level up from automatic variables and can be used in a variety of ways. Virtual variables are used to take the raw data from automatic variables and manipulate it into a useful form for analysis and reporting. Virtual variables can apply a range of mathematical operations on other variables from basic arithmetic to more advanced functions.

### Creating a new virtual variable

Virtual variables can be created from the left-hand navigation bar by hovering over the Variables feature group, selecting New variable, and then Virtual variable.

In the New Virtual Variable creation screen, there are several important parameters to enter.

- Organisation: The
*Select*button opens a pop-up menu of the available organisations in which to store the new variable. - Name: Enter the name of the variable. This will appear on the variable's chart and will also be displayed in the right-hand organisation tree.
- Description: Variable descriptions appear in the list view of all variables in an organisation. Add extra details here like an asset or process this variable represents, a unit conversion being applied, or a key to interpreting the data.
- Output unit: Set the variable's unit of measure.
- Frequency: Set the minimum frequency this variable can be displayed at.
- Aggregation: Define the aggregation method for how this variable will be displayed at Frequencies higher than its set point.

### The equation editor

The Equation editor block defines what the new virtual variable actually *does*. It serves as a powerful tool to apply mathematical operations, process raw data, and prepare variables for reports. Virtual variables can be as simple as a constant value to as complex as a series of non-linear equations. Virtual variables can be made up of other variables (both virtual and automatic), constants, and mathematical operations.

Other variables can be

The calculation of a new virtual variable can be defined by selecting the desired variables that will be used in the calculation and the mathematical operations to perform on the selected variables. For example, the ‘Alpha Meter Channel 1’ and ‘Alpha Meter Channel 1’ can be added together to a create a virtual variable that represents the total utility cost of the facility.

A list of these advanced functions as well as syntax instructions and examples can be found at the Variable operations article.

### Understanding Frequency and Aggregation

The creation of a Virtual variable is similar to the creation of an Automatic variable. However, the Aggregation and Frequency operate a bit differently. Before applying any functions, the Automatic variable in the equation are grouped in buckets determined by the Virtual variable's Frequency. Each Automatic variable uses it's own Aggregation method to be grouped together, then the Virtual variable's equations is applied to them.

For example, let's have variables A and B being automatic with a 1 minute Frequency and with respectively *Sum* and *Maximum* Aggregation. Let's also have the variable C is virtual and has a 5 minute Frequency and a *Sum* Aggregation. The equation of C is : C = A + B

This process is important to understand, especially if the equation uses non-linear functions. For example, let's have V1 and V2 being automatic with a 1 minute **Frequency** and a *Sum* **Aggregation**. The **Virtual variable** V = V1*V2 has totally different values if it's **Frequency** is 1 minute or 5 minutes. With a 1 minute **Frequency **we have:

With a 5 minutes **Frequency **we have: