Hello all,

I want to calculate monthly totals of a flow meter recording in cubic meters per hour. Using the AdvCalcData function works fine when using the current time * as end time, giving my monthly totals up to last month.

I would like to include the total of the current month up to now in my results as well. Entering the end of the month as end time works, but gives the wrong results.

Digging deeper, I found that the AdvCalcData returns different totals depending on the given end date, even if the end date is **bigger** then the current date.

For example, calculating the total of the SINUSOID tag from '1 July 2019' to '*' (29 July 2019 10:45) gives a total of 34153. Calculating the total from '1 July 2019' tot '1 aug 2019' however gives a different result, 37226.

Can someone explain what is causing this difference in calculated total value? And can you tell me the proper method to get the monthly totals including the current month total up to today?

Thanks in advance,

Abel Heinsbroek

I just read the following in the Web API documentation:

Apparently PI labels the data in the 'future' as Bad Values and actually does some sort of extrapolation to get the total to the month end.

I found out that this can be solved using a filter expression ('SINUSOID' > -999999), which returns the expected response.

Maybe it is a good idea to update the User Guide with this caveat?