how to sum up the numbers from a group

 0 1 Hi Open Foris Team, I have a question - Can you please explain to me how to sum up the numbers in the following case: If I have the case like this: 1 1 2 2 2 2 3 3 3 4 5 5 And I want to add one representative of each number group (e.i. 1+2+3+4+5) Thanks in advance asked 04 Jan '18, 11:57 beka 181●10 accept rate: 6%

 1 Hi Beka, Sorry, you are right, the expression won't work in this case. We will add an extra custom `math:sum` function that can be used in this case, it will be available in version 3.21 of Collect (it will be released next week). Thanks again, Open Foris Team answered 05 Jan '18, 14:39 OF Collect ♦♦ 3.1k●1●8 accept rate: 23%
 0 Thank you very much. I tried expression like this: sum(idm:distinct-values(parent()/tree/sum_basal_area1)) And after preview, when I press "tree" Entity, the error message appears. https://drive.google.com/drive/folders/1FUcehn5Js3LBH3w-gG9876MI-S8Yq4DM?usp=sharing answered 05 Jan '18, 14:00 beka 181●10 accept rate: 6%
 1 Hi Beka, You can use an expression like this: `sum(idm:distinct-values(list_of_values))` where `list_of_values` can be provided as a multiple attribute or as an attribute inside a multiple entity, so your final expression can be: `sum(idm:distinct-values(entity_name/attribute_name))` Many thanks, Open Foris Team answered 05 Jan '18, 12:06 OF Collect ♦♦ 3.1k●1●8 accept rate: 23% Thank you very much. I tried expression like this: sum(idm:distinct-values(parent()/tree/sum_basal_area1)) And after preview, when I press "tree" Entity, the error message appears. https://drive.google.com/drive/folders/1FUcehn5Js3LBH3w-gG9876MI-S8Yq4DM?usp=sharing (05 Jan '18, 13:59) beka
 toggle preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Question tags:

×382

question asked: 04 Jan '18, 11:57

question was seen: 1,064 times

last updated: 05 Jan '18, 14:39