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.
Quest about value range average ?
-
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.

-
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?
-
@craigweb Yes it work!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login