1 of 2 people found this helpful
This can be calculated in several ways.
Totalizer Today->Now: TagTot('raw',T,*)
Keep it as event-triggered and it should accumulate like you explain.
A second way (less robust) would be.
Accumulated = Raw+Accumulated
Then do a reset every day. For example if(Hour=00 and minute = 00) then 0 else Raw+Accumulated
Can you provide some more information?
-What problem are you running into? What do you mean by variable results?
-How are you pulling in your data?
-How are you calculating the accumulated data?
Looks like you are trying to use future data for your analysis, is that your intent?
Tagtot() and TagMean()*EventCount() are calculating two different things. So I think we need to determine which one you really need first.
Tagtot() does a time integral of an attribute's value over a specified time range.
TagMean()*EventCount() will give you the total sum of a tag during a specified time range.
Correct me if I'm wrong, but I believe you want TagMean()*EventCount() in your situation. First glance your calculations look correct. I think it would be helpful to break your calculation apart for testing, doing something like this:
That way you can see what each function is doing. Take these values and compare it to what it is when you manual calculate it.
It my example I made it very easy I had 2 values, 99.028+86.378=185.406 which is rounded to 185.41.