Unpivot? Column Aggregate + Ungroup?

Hi. First time for asking question on here.

I’m trying to dealing this kind of data

These are column Names
A_up A_middle A_down B_up B_middle B_down (…) C_down

And of course, there is value for each column.
I need to change the table structure as following:

Name up middle down
A value value value
B value value value
C value value value

I thought unpivot would work but I’m lost now.
If anyone can help me, it would be appreciated.
Thank you!

Hi @knightas7 Welcome to KNIME Forum

I was thinking of something like this unpivot_pivot.knwf (35.2 KB)
First do an unpivot of the data, and then change the columns names so you can use them to pivot the data again with only the 3 columns.

gr. Hans


Hello HansS Thanks for welcome and solution.
About a cell splitter you used, if I don’t have a character to use as delimiter, would there be other way to do this? Like, Aup Amiddle Abottom etc.

Edit: Oh, never mind! I replaced it with replacer. I should learn more about regex to be efficient tho. Thank you!

1 Like

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