AnsweredAssumed Answered

Tagtot Rolling 12 Month Total Value Decreases When Source Tag is 0

Question asked by CarlThorwall on Oct 26, 2017
Latest reply on Oct 26, 2017 by gmichaud-verreault

I'm stuck on a tagtot calculation.  I have a source tag that calculates a value in lbs/day.  I created a tagtot calculation that runs once a day to provide a total since the beginning of the month BOM().  That formula works as expected.  However, for regulatory purposes I need the same source tag totalized on a rolling 12 month basis. So just like the monthly tagtot, I built an analysis in PI AF (tagtot(Sourcetag,'*-365d','*') and set it up to run once a day 0300.  Our pi system is newer and only has 207 days of data in it so data previous to 207 back should be 0s (?) and it should totalize all of the past 365 days of the sourcetag.  However, when the source tag is 0 the monthly total stops accumulating while the rolling 12 mo total actually decreases.  I would expect it to decrease in the future when the source tag is 0 since the total would decrease but not now when all of the data prior to 207 days back should be a zero, so a zero day should fall off and a zero day should be added so there should be no net change.  What am I missing?

 

Orange is source tag

Purple is the monthly total

Blue is the rolling 12 month total 

 

 

Any pointers or things to look at would be great.  Thanks in Advance!

Outcomes