Time Weighted Average History Pull Times

I have a tag history binding on a custom property and i am using the time weighted average aggregation mode with a “fixed 1” return. I noticed today that the average number was higher then any raw number for the time frame in which i was pulling data. after some testing i found out that this was because the value right before the start of my time frame was large, which is fine, but i dont want that included in my average calculation.

So my question is, is there a setting i can use to only consider historian point within my start and end time for the history pull?

That’s interesting that a point before your time frame is making an impact. Just as a test, does this still happen if you have “Prevent Interpolation” enabled on your binding?
Also is there a chance that your gateway is in a different time zone and therefore the time frame you are inputting is not exactly what the gateway thinks the time frame is?

i tried the no interpolation option to no effect. In regards to the timezone thought, i dont think that is causing an issue. during my troubleshooting i set a test custom property to show all row for teh values i was trying to average. when i set my start time for the history pull to after the time of the first data point within my original time frame the aggregation works fine (but is still pulling the previous data point.

One thing i did notice is that either “on change” or “natural” return format (i can’t remember which as i don’t have the project in front of me right now) returned the previous 1 data point from outside the start time. Maybe the time weighted average aggregation function uses that return method before it calculates it.

but i was able to write a script i put on property change and calculated it my self from the raw data history pull. so its working but i would prefer not to have to use the additional script if possible.

I have not been able to reproduce this issue you are seeing. You’d probably be better off at this point contacting support so they can take a look at your system to see if there’s something missing here.

Thanks for looking into this. I will definitely contact support at some point on this. but since i was able to produce a work around I am moving this lower on my priority list for now.