I am creating a template for pump flowrates that totalizes flow at daily, monthly, yearly intervals. On top of that, I am creating tags for yesterdays total, last months total, and last years total.
I am able to make tags with correct logic for all of the except last years total. This is because there is no BOY (beginning of year) built-in-function like there is for BOM or BOD. I'm wondering if there is a way I can create logic that avoids this.
For reference, this is the logic for yesterdays total, last months total:
PreviousDay
If (Hour('*')=0 And Day('*')=1 And Month('*')=1) Then TagTot('Flow Value (Cleansed)', '*-1y', '*', 90)*24 Else TagTot('Flow Value (Cleansed)', BOM('Jan'), '*', 90)*24
PreviousMonth
If(Hour('*-1mo')=0 And Day('*-1mo')=1) Then TagTot('Flow Value (Cleansed)', '*-2mo', '*-1mo',90)*24 Else TagTot('Flow Value (Cleansed)', BOM('*-1mo'), BOM('*'),90)*24
YearlyTotalizer
If (Hour('*')=0 And Day('*')=1 And Month('*')=1) Then TagTot('Flow Value (Cleansed)', '*-1y', '*', 90)*24 Else TagTot('Flow Value (Cleansed)', BOM('Jan'), '*', 90)*24