Hi, I am looking to calculate the average of a Pi tag, X, only when Pi tag, Y, is greater than a value Z, over a 12-hour period in Excel.

I have attempted to use the PiAdvCalcVal function and filtering, but I am coming up with a error in Excel

I cannot find any examples online to base this off, any assistance would be greatly appreciated.