I am trying to put together a tag total function based on the time that a tag is equal to a specific value. I have the equation set up as below. When I evaluate the equation I receive an error that says "Invalid expression "WFE_A_MODE" I can evaluate the TimeEQ equation separately and it runs fine.

TagTot('FC-9918.PV','(TimeEq('WFE_A_WFE_MODE.PV','*-30d','*',"Production - 1st Pass"))')

Thank you for the help.

dan

Yes, I would expect it to fail because it does not make sense to use a TImeEQ equation with TagTot. TimeEq gives you time duration (timespan) and not a point in time (date time).

Thanks for the details. So you want to do a filtered total.

For what you are doing I would recommend this KB article: https://customers.osisoft.com/s/knowledgearticle?knowledgeArticleUrl=KB01120 and looking at example #1.

Note, wherever you see "formula" you could replace it with analysis that does not write output to PI. Also, you probably could do this with the new array formulas introduced a year ago.