# Working with Sub Groups

**URL:** <https://forum.knime.com/t/working-with-sub-groups/905>\
**Category:** KNIME Analytics Platform\
**Created:** [October 20, 2010, 11:07pm UTC](https://forum.knime.com/t/working-with-sub-groups/905 "2010-10-20T23:07:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaygill](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/b19c9b/32.png) [@jaygill](https://forum.knime.com/u/jaygill)\
**Post date:** [October 20, 2010, 11:07pm UTC](https://forum.knime.com/t/working-with-sub-groups/905/1 "2010-10-20T23:07:14Z")

</div>

All,

I'd like to be able to split my data into groups based on values in a specific row, and then analyze each group independantly.&nbsp; I can use GroupBy to calc basic stats once beyond the basics there isn't much I know how to do.

Use Case - 1 - I have a 16x24 array, for each row I'd like to be able to delete the max and min value and then compute the mean.&nbsp; Similarly for columns

Use Case 2 - I have an array with 32.000 rows and 4 columns Plate, Row, Col, Value.&nbsp; I'd like to be able to compute the mean&nbsp;across Plate for all rows, cols and values.&nbsp;E.G mean all values in row1,col1 across all plates, mean all values in Row1 across all plates etc.

I know how to do this in another popular tool, but I'd like to do this in Knime

&nbsp;

Jay

---

<div class="post-metadata">

**Author:** ![gabriel](https://forum-cdn.knime.com/user_avatar/forum.knime.com/gabriel/32/61386_2.png) [@gabriel](https://forum.knime.com/u/gabriel)\
**Post date:** [October 26, 2010, 9:45am UTC](https://forum.knime.com/t/working-with-sub-groups/905/2 "2010-10-26T09:45:54Z")

</div>

Hi Jay,

I am not sure about the second problem, but I think the first one can be solved by using the following nodes:

- Create Collection
- Ungroup
- Group
- Math Formula (Java Snippet)

The trick is to ungroup the numeric data columns first, and then group it again with different aggregation methods, such as mean, min, max and count. Those statistical values can then be used to compute the new mean - without min and max values. Sorry, we don't have a single node for this problem; only the scripting nodes like Java Snippet, Perl, and of course R will allow you to do the operation in one step.

Hope this help?

Regards, Thomas

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 23, 2023, 8:15pm UTC](https://forum.knime.com/t/working-with-sub-groups/905/3 "2023-06-23T20:15:47Z")

</div>


