AnsweredAssumed Answered

TagTot calculation going negative after midnight when source data stays positive

Question asked by JeremyMahon on Aug 26, 2016
Latest reply on Aug 29, 2016 by JeremyMahon

Hi all. I recently implemented some PEs that use the TagTot function to give us a daily gas burn total. The gas day goes from 10am-10am, rather than midnight-midnight. A sample of the logic is below:


if (Hour('*')<10) then (TagTot('GASFLOW_UOMperHOUR','y+10h','t+10h')*24) else (TagTot('GASFLOW_UOMperHOUR','t+10h','*')*24)


Essentially, I am saying that if the hour is prior to 10am, then give me "yesterday's" total from y+10h to t+10h, else give me the running total from t+10h until current time. Makes sense, works as expected...until midnight hits. It jumps way up and then the trend/values start to decline--which is not expected behavior for a "totalizer." The source data remains relatively constant for this unit so it's odd that the totalizer trend would decline. I would expect its slope to go flatter if a unit was coming offline (therefore less gas burn) but this unit runs almost 24/7 (therefore relatively constant gas flow). Any ideas? See trend below (showing yesterday ...