I am trying to calculate the average value of a tag for a single day's data. Here is the code snippet:
Output_Tag.Value = Input_Tag_1.Avg((Today.AddDays(-1)), Today, 80) + Input_Tag_2.Avg((Today.AddDays(-1)), Today, 80)
I want to calculate the average between yesterday 12AM to today 12AM. The issue I am facing in this calculation is if any data is present for any day it is returning the average value irrespective of the range specified. I have tested it by deleting yesterday's data but still it is showing the average value calculating the average of 27th April's data.
Can any help with this?