I am trying to implement a functionality similar to what is available in PI Datalink to calculate the average of a tag for last 30 days by entering filter criteria in PI Analysis. I am not able to find any functions in PI Analysis to achieve this directly so was wondering if someone has tried implementing this in any way.

Sample PI DataLink function: PIAdvCalcFilVal("Tag1","*-3mo","*","'Tag2' = ""Open""","average (time-weighted)","time-weighted","compressed","10m",0,1,0,"PIServer")

With above example, Average data for Tag1 is returned based on the filter condition 'Tag2' = "Open" provided above.

Thanks,

Nilay

Hi Nilay,

Have a look at KB01120 - I believe that this should cover the functionality you are looking for.

Cheers,

John