
Re: Daily counter if any input data is available and monthly average
sraposo Nov 14, 2017 2:23 PM (in response to newfunda)Hi Manish,
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?
Thanks,
Sebastien

Re: Daily counter if any input data is available and monthly average
newfunda Nov 14, 2017 6:57 PM (in response to sraposo)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.
Thanks!

Re: Daily counter if any input data is available and monthly average
newfunda Jan 30, 2018 5:48 AM (in response to sraposo)Hi Sebastien,
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.
Thanks,
Manish

Calculation.png 276.1 KB



Re: Daily counter if any input data is available and monthly average
Roger Palmen Jan 30, 2018 8:05 AM (in response to newfunda)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