3 Replies Latest reply on Jun 17, 2014 9:14 PM by Vidya

    Analytics: How to make TagAvg() function return good value

    Vidya

      Hi,

       

       

       

      I am using TagAvg() function in analytics to get average of last 10 mins for a tag. The tag has only 1 archived value sometimes in this 10 minutes interval. This makes TagAvg() return an “Error”, instead of the average value.

       

       

       

      What is the solution/work around for this ?

       

       

       

      Vidya Shettar

        • Re: Analytics: How to make TagAvg() function return good value
          Mike Zboray

          Vidya,

           

          I can't reproduce this behavior with TagAvg (a time average with a single value in the range produces a result for me), but here are a few things to try:

           

          1) You can check whether the return value was bad by using the BadVal function.
          2) If there is an error when you Evaluate in PSE, near the bottom of the window there is typically more information on what caused the error.

           

          I was able to get an error with TagMean (event weighted average) when there are no values in the range:

           

          4034.EvaluationError.png

           

          Mike