Answers to: Calculating cumulative sum of basal areahttp://www.openforis.org/support/questions/32/calculating-cumulative-sum-of-basal-area<p>Hi!</p>
<p>How can I calculate the cumulative sum of a set of attributes with basal area?</p>
<p>Thanks!</p>enThu, 09 Oct 2014 21:42:55 +0200Answer by OF Collecthttp://www.openforis.org/support/questions/32/calculating-cumulative-sum-of-basal-area/37<p>Suppose that you have an entity called "tree", a calculated attribute inside of it "tree_num" with the position of the tree (<strong>idm:position()</strong> expression can be used), and a calculated attribute for the basal area, we can call it <strong>ba</strong> for example, then you can sum the basal area of the previous inserted trees with an expression like this: <strong>sum(parent()/tree[tree_num < $this/parent()/tree_num]/ba)</strong>.
Thanks</p>OF CollectThu, 09 Oct 2014 21:42:55 +0200http://www.openforis.org/support/questions/32/calculating-cumulative-sum-of-basal-area/37