Hello,
I am looking how to add values of some rows in order to reduce the row’s number.
For example:
I want to combine the rows 26+28+30+32 in one and to rename it.
Below is my table…
Thank you
Hi Angela_Dru,
one way might be selecting the rows you want to aggregate (rule-based rule engine to identify categories + row splitter to separate rows to be aggregated) and use a GroupBy node to sum the values. Then concatenate results.
RB
Thank you @lelloba but your answer is not very clair for me…
Should I use first rule engine node? If yes how to select the rows? I see only columns…
Try this: Sum of rows – KNIME Hub
Is it working for you? ![]()
RB
How you managed column expression? Have no experience with this node…
how to assign the same number to rows…
a little bit tricky my post
You advised to assign the same number to rows ? How is possible?
Thank you, so first I have to create an additional column like your”group”
Exactly! First create, then populate ![]()
Thanks, I managed
It’s a little “monkey work” because my data set has 400 rows…
but it’s an option anyway
I saw that there should be some kind of hierarchy inside the activity column.
Maybe you can just consider level 1 (eg Personal care activities) instead of sleeping, grooming and others. In this case, filter all level 2 activities and keep the main level (personal care activities, eating and drinking, household activities, etc.).
RB
Any ideas how to filter 2 level of activities?
I can use your method with Table editor, but it’s the same consuming of time.
As you can see, there is a certain number of spaces before a general category and a different number of spaces before the second-order category.
Count the number of spaces before the second-order category. Then go back here Sum of rows – KNIME Hub and inside the pattern cell of the Row Splitter node insert the number of spaces for the second-order category and an asterisk. Leave everything else as it is in the image below.
RB
Brilliant idea but I have no result
I tried till 6 spaces and no changes
Hi Angela,
Could you please share some data?
Thanks,
RB