Hello Pi community,

I'm looking for some help on how i can take one calculated data together with the "IF" statement of excel. The problem is that I have one variable that I need the average of temperature per hour but only if the equipment is indicating that is ON.

Is something like: =IF("TagON/OFF"="ON",advcalcdata average for the tag of temperature)

Wishing the best for all the community,

D.C.

Hi David,

Below expression will work in PI Datalink Calculation data function,

PIAdvCalcFilVal("TempratureTag","*","*-1d","'TagON/OFF' = 1","average (event-weighted)","event-weighted","compressed","10m",0,1,0,"PI Server")For these type of calculations, I recommend you to use the PI Analysis in order to get more options and better results.

Analysis Example:

Refer to Sebastien Raposo's Blog for Asset Analytics best practices.

Regards,

Vasanth.