
Re: Tagavg showing bias
pmartin May 31, 2017 1:47 PM (in response to MPetro)Hi Mauricio,
What are the values that you are getting for Attribute2? I just want to make sure it's not the easy solution .

Re: Tagavg showing bias
skwan May 31, 2017 4:45 PM (in response to pmartin)Can you execute the analysis in "Preview" and see what the table of numbers look like? Do the numbers make sense?
You can also rightclick on attribute 1 and attribute 2 to bring up the Time Series Data dialog box and check to see if the data make sense.
Let us know what you find.

Steve Kwan

Re: Tagavg showing bias
MPetro May 31, 2017 5:04 PM (in response to skwan)Funny thing. The dummy configuration presented is slightly different from the original. Just as a last attempt, I changed the configuration to the one I showed here. It seems that it is working fine now.
The original configuration uses DR formula to do the multiplication. Than the average uses the formula result as input.
Attribute1: Value from PI point
Attribute2: Value from a Table
DR Formula: Attribute3 = Attribute1 * Attribute2
Analysis: Tagavg('Attribute3','*5m','*') Scheduling: every 5 minutes
Attribute4: Output from Analysis saved in PI Point
So now the question is: what does Tagavg do if the input is a DR formula? I have several other configurations done this way.

Re: Tagavg showing bias
MPetro May 31, 2017 5:18 PM (in response to MPetro)Speculating possible reasons...
The DR formula is
A=.Attribute1;B=.Attribute2;[A*B*24];DefaultAllowed=1
Default value = 0
I realised that the last value in a Processbook graph shows the default value (why? I don't know! Not always, but it is fairly common to see that). If the Tagavg includes the default value, in this case zero, it will always average a lower value.
Is this correct?



Re: Tagavg showing bias
MPetro May 31, 2017 4:54 PM (in response to pmartin)The Table Lookup gets a constant to make unit convertion.


Re: Tagavg showing bias
MPetro Jun 7, 2017 6:31 PM (in response to MPetro)Here what I got after some testing.
Formula DR with DefaultAllowed=1
The average function Tagavg() consider the default value in the calculation. In my case, zero, causing a bias to a lower value. Since my average is for 20 or so value, I usually get 45% bias.
Formula DR
The average works fine. But the result does not match exactly the average done in Excel Datalink. So it is a new kind of problem...