I realize TagTot won't work on Event-weighted, so I have been using the TagMean method, but it is not very accurate, is there a better way?
Can you explain more about what you are wanting to do? The subject line "Total values" suggests that you want to know the count of values, whereas if it were a subtle change to "Total of values", then it suggests you want to have a total of the values. Is the tag or attribute in question itself a rate of something per unit time?
I have a tag created in PI AF that holds values of weights if it meets certain criteria, the value will update to the most current value, as most tags do. I need to total this value at the end of the day.
Hi, Jeffrey. Thanks for the additional info! Have you tried TagTot with the CalculationBasis option set to EventWeighted?
This was introduced in AF 2018 SP2; see item 2 here if you would like to see a screenshot example or a link to a workaround if you are on an older version.
So what is the ,"",0, part of that expression?Thanks for bringing this up, I had no idea.
These are for the other two "optional" parameters, toUnit and pctGood in the TagTot function (see the PI Server link in my previous post for more details). I put optional in quotes, because the way the order of these parameters works, if you want to use the last one (i.e., calculationBasis), you have to fill in values for the first two. By using an empty string ("") for toUnit, I'm telling the function not to do any conversion work, and by using 0 for pctGood, I'm telling it to return a result no matter what the percentage of good data is in the time range (of course, you probably want yours higher than this).
Retrieving data ...