Do the input need to be greater than 0 for a whole day or only have 1 event that is greater than 0 on a day?
There is no restriction it can be any numeric value for a day.
Say next day, I am checking for yesterday data then it can be anything i.e. some data or no data, if no data for any input then nothing to be done but if at least one input is having data > 0 then some counter Count = Count + 1 i.e.
if input1 > 0 or input2 > 0 or input3 > 0 then sum= input1+input2+input3 and Count = Count + 1, meaning I need average in such case daily and then sum up all these daily average to get average for a month (last month).
Also in daily averaging I need to check if input2 > 0.2 then some other counter to count the number of times input2 was greater than 0.2.
I had written the calculation but not sure whether it will work or not. I may need to do more calculation but basically I need monthly report for above scenario.
Calculating daily can be easy but accumulating those daily result for a month and reporting monthly is my goal.
Whatever I tried is not working, so need your help here. As I said any of the three input value can be either =0 or > 0 for any given day.
Please find the attachment of the calculation I prepared for the requirement.
Variables in calculation: NOCD=Number Of Calendar Days
Step 3 in calculation means go to next day i.e. Day = Day + 1 .
Kindly let me know in case you need more information.
Calculation.png 276.1 KB
I would do some intermediate calculations:
- Determine a daily count of the input tags to determine if there is data for these points and store that in a PI Point.
- Based on the last month you need (previous month, current running month?) use e.g. the average over this tag to determine if there were days with missing data
- Average can then be calculated using the regular TagAvg function