When creating data tags, one of the fields to set up is the Formula field. This field determines how raw data will be aggregated and sent to the StrideLinx Cloud. Choosing the correct formula is very important to optimally utilize the data that is being extracted from a machine.

When logging on change, the value will be logged every time it changes, this means that no aggregation needs to take place. When logging on trigger, the value will be logged every time a trigger is met. This means that aggregation is not necessary in these cases, and you can't choose a formula when you're logging on change or trigger.

# What is aggregation?

Machine data will be logged on the interval of your choice. For example, every minute. Now, let's say that in this minute a temperature sensor measures temperature fluctuations in the motor of this machine. In this minute the sensor noticed that the temperature shifted more than one degree Celsius for 20 times. Because the logging interval is set to every minute, only one value will be logged during this minute.

Aggregation is basically a simple calculation of the available data points to determine what value needs to be stored.

In the example of the temperature sensor, it is, therefore, possible to choose to log the highest temperature of the 20 values, the last value, or if it is necessary to get an overview of the average temperature, you can choose the mean value.

# What formulas can I choose from?

When logging on (time) interval, a formula is necessary because data needs to be aggregated. The following options can be chosen:

## MEAN

This formula logs the average value of all available data of the time period. That will create a good oversight of how a variable in a machine performs during the selected time interval. This makes this formula a good choice when logging on large intervals where the average performance over these time intervals is of interest.

## MIN

This formula logs the lowest value of the data in a certain time interval. This formula is best utilized when searching for lows in a machine's performance. For example, when looking for temporary hick-ups.

## MAX

This formula logs the highest value of all data points. This formula can be used to find peaks in machine data. For example, it is possible to use this formula to find voltage peaks in a component of a machine, which may be an important indicator of changes or errors in that machine.

## LAST (default)

This formula doesn't do any calculations, it simply logs the last available value of the time interval. This is the default value because it can be used in a wide variety of use cases. When not sure if any of the other aggregators is a good fit, this is probably the best choice.

## INCREASE

## Supported hardware

This formula counts how many numbers the value of a variable rises. As a result, the amount in which the value has grown during the time interval will be logged. This formula is specifically designed for counters in a machine.

Please keep in mind that this formula will only take data increases in mind. Resets and declines in the value of the variable will not be taken into account by this formula.