• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Quest about value range average ?

    Dashboard Designer & Custom AngularJS Pages
    2
    3
    1.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • seanS
      sean
      last edited by

      I have a question code like

      <ma-now update-interval="15 SECONDS" output="theTimeNow"></ma-now>
      
      <ma-point-values point="point2" values="point2Values"  from="theTimeNow | maMoment:'subtract':1:'Month'" to="theTimeNow" rollup="AVERAGE" rollup-interval="1 HOURS">
      </ma-point-values>
      
      {{}}
      

      how do I code to show a point2 last value from ma-now to before a month average kind of ma-point-values filter in {{}}?
      not {{point2Values}} this way. because like pic. I need just a number.
      0_1545305671607_values.PNG

      1 Reply Last reply Reply Quote 0
      • CraigWebC
        CraigWeb
        last edited by CraigWeb

        Hi Sean

        I am not sure what your question is. if you want the last value from the array you can do this:

        {{point2Values[point2Values.length-1].value}}
        or if you want the first value
        {{point2Values[0].value}}

        If you looking for the average value over the whole month you should use
        <ma-point-statistics point="point2" from="theTimeNow | maMoment:'subtract':1:'Month'" to="theTimeNow" statistics="statsObj"></ma-point-statistics>

        {{statsObj.average.value}}

        Is that what you are looking for?

        seanS 1 Reply Last reply Reply Quote 0
        • seanS
          sean @CraigWeb
          last edited by

          @craigweb Yes it work!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post