0

Count Calculation

What is the best operation to use to count every hour a tag is On (active, =1) for an entire week or 168 hrs. Then reset at the end of the week and start counting again?

1 reply

null
    • smason
    • 1 yr ago
    • Reported - view

    Hi zachary. zeppuhar ,

    You would want to use the ResettingAnchoredInterval function in conjunction with the DurationInStateNonZero aggregate. It will look like this:

    DurationInStateNonZero outputs milliseconds which is why I have the division afterwards to convert it to hours. I have it set to calculate periodically every hour. It will then reset at midnight on Sunday and start its count over again.

    Hope this works for you.

Content aside

print this pagePrint this page
  • 1 yr agoLast active
  • 1Replies
  • 91Views
  • 2 Following