I am using sampled data to retrieve values of an AF attribute. There is an AF table containing the sales records. I have an attribute "ori" to calculate the total sale amount of the previous day, and an attribute "result" to determine whether "ori" is a bad value. The configuration statement are like below:
ori(table lookup): SELECT Sum(amout) FROM table1 WHERE productName = 'product1' AND dateOfNextDay <= #%Time%# AND dateOfThirdDay > #%Time%#
result(formula): A=.|ori;[if badval(A) then 0 else A]
And when I retrieve time series data in PSE and datalink separately:
See? There is a 1 day gap between the two results. I checked my AF table and the results in PSE is correct. I also tried timed data and archive value in datalink, and got thesame wrong results. Could anyone figure it out for me? Thanks!