Skip to main content

User Guide

Stepped daily aggregations

The idea is to trick TrendMiner by adding an extra point at the beginning of the day, and then have TrendMiner interpolate that point using the sqrt(-1) function.

The result is a tag that shows daily values as discrete (stepped) tag.

Tag-Builder Formula:

if(and(a<>b,b=c),AGGREGATION_1,

if(and(a=b,b<>c),AGGREGATION_2,

sqrt(-1)))

Variable

Tag 

Shift

a

TM_day

1s

b

TM_day

0s

c

TM_day

-1s

AGGREGATION_1

Aggregegation__Forward_24h

0s

AGGREGATION_2

Aggregegation__Forward_24h

23h 59m 59s

  1. The formula requires an AGGREGATION tag that calculates FORWARD over 24 HOURS with any OPERATOR (Average, Integral,...).

  2. The first if function is TRUE if a is not equal to b and b is equal to c. This is true if the day in TM_day has just changed (Tuesday to Wednesday). Then the new formula day has the value of INTEGRAL_1.

    image.png
  3. The second if function is TRUE if a is equal to b and b is not equal to c. This is true if the day in TM_day is about to change (still Tuesday, just before Wednesday). Then the new formula day has the value of INTEGRAL_2.

    image.png
  4. If neither condition is true (both FALSE), the trick, square root of -1 (sqrt(-1)), interpolates between the data points.

    image.png