I have a PI tag that I want to calculate time-weighted daily averages over a 1 year period. The tag value should range between 0 and 3000, however the instantaneous data periodically returns values of -999999, which skews the calculated averages.

I've tried using the filter expression 'TagName' > 0 to remove the negative values, however it still returns negative calculated averages, albeit smaller in magnitude (e.g. for a specified time returns -400 instead of -40000).

Am I missing something in my filter expression?