I have built a data reference that calculates an average value of a PI Tag over a period defined by other attributes in the element. The calculation seems to work and produces a result.
However the problem is that I would like to plot this value on a PI Trend, when I currently plot it, I get a straight line on the trend at the current calculated value. I think it must be something to do with the time I am passing back with the new value. I have used the AFTime.Now but this seems to be current time rather than the query time.
Is there anything I can try?