AnsweredAssumed Answered

Calculations dependent on hour of day

Question asked by piotrszelag on Apr 27, 2016
Latest reply on Apr 28, 2016 by piotrszelag


I have a problem and I don't know how to start.


I have element in PI AF. One of the at attribute is the source of calculations.

Depend on hour of a day I would like to find a range in some time and multiply  another attribute.

for example

Attribute 1 has

time stamp; value

00:00:00      34

00:05:00     36

00:40:00     45

01:20:00     50

02:04:00     52

02:32:21     55

03:10:00     60


I also have :

Attribute1 with default value 25 (it is constant)

Attribute2 with default value 10 (it is constant)

Attribute3 with default value 50 (it is constant)


I would like to find range between 00:00:00 and 01:00:00 and multiply  value of attribute1, range between 01:00:00 and 03:00:00 multiply  Attribute2, range between 03:00:00 and 00:00:00 next day multiply  Attribute3

Results of this operations I want to put into another attribute (so i get three values a day with time stamp 01:00:00, 03:00:00, 00:00:00 next day)


I have some experience with PI AF and programming but till now I didn't use PI Event Frames and Analytics.