moving data between rows to group it in separate columns

Hello,

sorry, but I can’t find a solution for my problem. Maybe it is trivial, but in my case your help is required.

I have set of data as on the picture1.

In the separate rows there are values in columns that there is a value in only one column in each row (I mean about columns from [1_noc1] to [15_pu…] which are located on the right from date column [0_data]. I want to group this data by the date - [0_data] column, to have only one record / row for each day, and to have all values concerning this date moved to one row as on the picture2.

Till now I cannot do it using group node as well as using excel’s VLOOKUP eqivalent in Knime. Is there any smiple way to get it?

Thanks in advance. Best Regards,

Pawel

Hi @PaW and welcome to the Community.

In the future, please share your data (either via excel or via your workflow), so that we can work with the data.

I have put something together for you, but since you did not provide any data, I added some generic data on my own.

What you want, can be achieve via the GroupBy node:
image

My input data:

And the results:

The trick here is to group by the column you need, in your case it would be 0_data, and then keep the Maximum value of each column, since null or empty values are sorted as minimum, and you want to keep the cells that have a value, like this:

Here’s the workflow:
removing empty cells.knwf (6.8 KB)

5 Likes

Thanks a lot @bruno29a for so great and prompt answer :smiley: It works fantastic. I made various tries, but didn’t use maximum as aggregation method. And sorry for not attached source data this time. I will do it always in the future.

Best regards.

Pawel

1 Like

No probem @PaW , I am happy to help

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