Hi guys,
Lets say I have the following table:
ID |
Name |
Value1 |
Value2 |
Value3 |
Value4 |
1 |
Chris |
12 |
|
|
|
1 |
Chris |
|
2 |
|
|
1 |
Chris |
|
|
4 |
|
1 |
Chris |
|
|
|
6 |
I want Knime to "sum up" the rows up like this:
ID |
Name |
Value1 |
Value2 |
Value3 |
Value4 |
1 |
Chris |
12 |
2 |
4 |
6 |
I tried the GROUP BY node, but am still struggeling.
Has anyone an idea how this could work?
Cheers
Chris
hornm
2
Hi Chris,
assuming that your input column are all of type String I would suggest the following workflow:
- String to Number-node to convert the Value*-columns into Number-columns - the empty cells are converted into missing cells
- Missing Value-node to replace the missing values by fixed values of 0
- GroupBy-node with ID and Name as grouping columns and the sum-aggregation-function defined on all Value*-columns.
Best,
Martin