4 Replies Latest reply on Jul 31, 2017 3:47 PM by JánosPetró

    Need Average of ABC where XYZ = 1


      Is there a way to get the average value of one tag, based on the value of another tag?


      In other words, I need the average 'speed' over an hour, when ANOTHER tag equals 0.


      Thanks for the input.

        • Re: Need Average of ABC where XYZ = 1


          There are many ways to do that.  Which client tool would you be using?  Are you talking about PI Points only or are you an AF user?


          Steve Kwan

          • Re: Need Average of ABC where XYZ = 1

            Hi Greg,


            If you're using Asset Analytics, you could do something like 'If Status has been Equal to 1 over the past hour (1h = 3600s) Then find the Average of the Speed over the past hour Else do nothing.' The analysis would need to be set to run periodically.




            Note: NoOutput() only works if you're outputting to a tag (versus an attribute); otherwise, you'll receive an error that says 'Functions such as NoOutput are not supported unless all mapped outputs are configured to save output history.'


            Hope this helps!


            2 of 2 people found this helpful