Looking for help moving sub-headers in a column into their own column

Hello, very new user, just downloaded version 4.7 on Windows. I’m looking to jump into a way to automate a workflow that I currently do manually in excel. Right now, I’m getting the very basic filtering and transformations but I’m struggling with this one. My biggest issue is I just don’t think I know the terminology of what to even google!

Let me just give a simple example and it might make more sense what I’m looking to do.

Here is essentially what I’m given:

UserID | UserName
GroupA |
1111 | Bob
2222 | Ellen
GoupB |
3333 | Greg
4444 | Garth
GoupC |
2222 | Ellen

What I’d like is:

UserID | UserName | Group
1111 | Bob | GroupA
2222 | Ellen | GroupA
3333 | Greg | GroupB
4444 | Garth | GroupB
2222 | Ellen | GroupC

@kingsteved welcome to the KNIME forum. You can do this by combining several nodes. You can identify the head off a block Group) and then the block by filling the musings. Next step would be a loop. Maybe a group loop to join the header to all your lines.

Maybe you can adapt this example

2 Likes

Thanks, that looks similar enough to get me started.

Cheers!

You could use Rule Engine Node to create a second column with only the “Group X”, then use missing value node with previous value to fill down and then (if necessary) combine columns with pipe symbol.
br

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.