1 of 1 people found this helpful
If I understand you correctly, you want a backwards looking average of the tag calculated whenever a new value comes in. For example, if sinusoid gets a new value at noon, then you want a tag that calculates the average of sinusoid from 4AM to noon. If that is the case, then you can use an Expression Analysis in AF (recommended) or a PE tag on the Data Archive server with a PE syntax like: TagAvg('sinusoid','*-8h','*'). Use Event Based (Natural) scheduling for the calculation so that it is triggered whenever a new value of the tag comes in.
Also, if you don't need the values written back to a tag and prefer to view the values on demand through a client, you can use the Average summary method (select Average for the By Time Range field) with a PI Point Data Reference in AF. Be sure to use Time Range Override for the By Time field and a Relative Time of *-8h. See the screenshot: