AnsweredAssumed Answered

Datalink archive value with a filter

Question asked by JamesOakley on May 11, 2020

Is there a way to apply filter to a PI Datalink Archive Value query to return a datapoint only with a specific value? I have a binary status tag (either "On" or "Off"), and I want to return a datapoint where it goes to "On" (i.e. using "next only" or "previous only" as the retrieval mode), ignoring if the next/previous value is "Off". I can refine the start/end times for my query to some extent, but sometimes I get this window incorrect and the "next" datapoint is where the tag goes to "Off", which I don't want. I've tried using the function with an expression but this returns a different result. I could make a separate query to download all the data in a window using the Compressed Data function and then use Excel to lookup the timestamp I want, but this is a but clunky and won't work for the many times I want to run this query.