• 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

    Statistics Extensions

    Dashboard Designer & Custom AngularJS Pages
    2
    2
    1.2k
    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.
    • H
      henryblu
      last edited by

      Would it be possible to do either of the following:

      a) Find the average of a data point across a period for Mondays only? i.e.

      <ma-point-statistics point="myPoint1" from="dateBar.from" to="dateBar.to" statistics="statsObj1"></ma-point-statistics>
      <p>
          The average value for Mondays in the period is {{ statsObj.averageif."Timestamp=Monday".value }}
          }}
      </p>
      

      I've tried a few techniques using moment filters but have had no luck.

      b) Somewhat similarly, could you find the average of a data series if another series is equal to/greater than/less than another value for the corresponding timestamp? For instance:

      <ma-point-statistics point="myPoint1" from="dateBar.from" to="dateBar.to" statistics="statsObj1"></ma-point-statistics>
      <ma-point-statistics point="myPoint2" from="dateBar.from" to="dateBar.to" statistics="statsObj2"></ma-point-statistics>
      <p>
          The average value when myPoint1 is greater than myPoint2 is {{ statsObj.averageif."StatsObj1.value>StatsObj2.value".value }}
          }}
      </p>
      

      I think these Excel style operations would be really useful to visualise trends in data immediately.

      Cheers, Henry

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        @henryblu It sounds like you are going to need to write some specialized logic in JavaScript. I'd suggest adding a custom component via the user module, see https://help.infiniteautomation.com/getting-started-with-a-user-module/

        You can leverage our maStatistics and maPointValues services to pull data from the REST API then process and output the data onto the page from the component. You can use the moment.js library directly inside your component, also we recently added the math.js library which might be useful. It has statistics and matrix functions.

        Developer at Radix IoT

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