Getting previous good value with analysis

Discussion created by htrada on Sep 14, 2020
Latest reply on Sep 16, 2020 by htrada


I´ve got the folowing time series data

where 1 is my actual value, 0 is the last known good value. and i´ve got several "out of serv" values corresponging to a comunication failure with the PLC.

I need to get the current value (thats easy with the analysis) and compare it with the previous known good value (0 in this case) to identify a change in that attribute. preval function needs an specifyc timestamp to get the value but that timestamp is unkown. 

How can this be achieved? any ideas?

in this example i´ve got only a couple of minutes between the 0 and the 1 but it may be days or months.

Thanks.Martin Lionello