Aggregation Mode Definitions

Hi,

Since some version ago, some new aggregation modes appears, wich is good; but the documentation lacks their definition.
Where can we get precise information on SQLTag History and following definition (formulas ?) : “Time-weighted Average”, “Min/max”, “Closet Value”, “Basic Average”

Thank you.

Hi,

They’re explained a bit in the section for the queryTagHistory scripting function, but I’ll make a note to have the binding screen updated too.

Fundamentally, aggregation mode is how to deal with multiple values for a giving window of time. For example, what happens when there are 3 data points, but you only want to return 1 value:
Time-weighted: Each value is weighted according to the amount of time it was valid for the window. So if a value is 0, and then spikes to 100 at the end of the window, the result will be more towards 0, not 50.

Min-Max: Two values are returned, the minimum value, and the maximum.

Closest Value: The value closest to the window boundary is returned. In other words, the last value of the window.

Basic Average: Normal average of the values, (V1+V2+Vn)/n.

Hope this helps,