I am trying to create a notification on a "rolling total" using performance equation. I am wondering is there a function or a simple method to accomplish this? I have an idea on how to do this but it seems like it would be a convoluted method. Thank you for the help!

Hi Steven,

Welcome to the world of PI Square! You can certainly do this in PI Performance Equations, but if you have PI Asset Framework (PI AF), we recommend using the PI Analysis Service instead to perform these calculations.

Either way, for a time-weighted total, you can use the TagTot() function to sum over a time range. For example TagTot('sinusoid', '*-12h', '*') does a rolling total across the 12 hours. For an event-weighted average rolling total, you would use TagAvg('sinusoid', '*-12h', '*') * EventCount('sinusoid', '*-12h', '*') instead.

You can schedule this calculation according to a be based on a time period (e.g. every hour), or to be event-triggered (evaluates for every new value of 'sinusoid').