Calculating cumulative sum of basal area

  • Asked
  • Active
  • Viewed 9439 times
0

Hi!

How can I calculate the cumulative sum of a set of attributes with basal area?

Thanks!

0

Accepted answer

Suppose that you have an entity called "tree", a calculated attribute inside of it "tree_num" with the position of the tree (idm:position() expression can be used), and a calculated attribute for the basal area, we can call it ba for example, then you can sum the basal area of the previous inserted trees with an expression like this: sum(parent()/tree[tree_num < $this/parent()/tree_num]/ba). Thanks

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.