AnsweredAssumed Answered

AF Analysis to calculate hourly sum based on events of another attribute

Question asked by PV342 on Mar 19, 2019
Latest reply on Mar 20, 2019 by PV342



I would like to calculate the hourly sum of an AF attribute (attribute A) using PI AF Analyses. The trend for attribute A appears as a piece-wise constant function. I need the hourly sum of the value of A, as sampled by the event frequency of another attribute (attribute B). For example, if over the hour A is constant at 5, and B changes 3 times, the analysis should return 15 for the hour. In this case, I could multiply the value of A by EventCount of B. But this does not work if the value of A changes in the middle of the hour. I can't see a way to do this calculation correctly without looping through the events for B (which I realize is not supported in Analyses). Is there a better approach, maybe by triggering an event frame every time the value of A changes?


Thank you.