I'm very new to PI and I'm trying to generate an average value in Excel for a parameter across several days, but I want to exclude times where the process stopped/was shutting down (all values are zero/far below steady state value).
Currently the function I have looks like:
=PIAdvCalcFilVal("TAG",”12/1/2022 1:00AM”,”12/3/2022 2:00AM”,(‘TAG’>=10),”average”,”event-weighted”,"interpolated",”10m”,50,1,4,"server")
But this just says "Invalid Expression Syntax". I have tested the following function which works:
=PIAdvCalcFilVal("TAG",”12/1/2022 1:00AM”,”12/3/2022 2:00AM”,("‘ALT_TAG’=""String"""),”average”,”event-weighted”,"interpolated",”10m”,50,1,4,"server")
The only difference is this value uses a string in the <FiltExp> section of the function.
I want to use this exact function except I want the average value of TAG when TAG's value is above/equal to 10, so I used (‘TAG’>=10) which gives me an error while ("‘ALT_TAG’=""String""") works just fine (without filtering the data with TAG value below 10).
I'm not sure what's going wrong, can I only filter data where a string value must be true or false? Can I not filter out data using the same tag I am trying to calculate the average of? I'm hoping this is a simple formatting fix!
I've attached the PI data link user guide page I am trying to learn from. Thanks for any help