Skip navigation
All Places > All Things PI - Ask, Discuss, Connect > Ideas

Analytics function for Last Good Value

score 23
You have not voted Submitted
Originally posted on UserVoice

We have come across a number of occasions where we want to bring in the last good value of an attribute as an input to an analytics.  But there is no way to do this without additional attributes and analytics.  It would be convenient if a function existed that brought in the last good value of the attribute.  This is particularly useful when your data source is known to send NULL value frequent which translate into No Data or Bad Input.  One specific example:

We have a number of analytics that only run if one of our engine is on.  But the SCADA system we get run status from flakes out often and PI records it as No Data.  When SCADA flakes out, we assume Last Good Value.  Meaning if the engine was on before the outage, we consider it on until SCADA returns and tells us otherwise.  But if we bring the run status into an analytic, it uses the value No Data and breaks everything.  Instead of No Data, we should be able to wrap that attribute in a LGV function that will report On instead of No Data.