filter a column based on value

Hey everyone,

I have an output table that has several cells with zeros and I wanted to remove those cells through either deleting or filtering. Table looks something like the below

Team1 Team2 Team3 Team4
66 0 20 0
0 6 0 15
0 0 0 3

Thank you

I’m not sure which type of Output you want but if you want something like
Team1 66
Team2 2
Team3 20
Team4 15
Team4 3

You can use the Unpivot node and then filter the value

Kinme%20filter

This is my table and I wanted to remove all the zeros and have a table like

output

Hi there!

Seems to me is that in Row1 are your column headers so maybe you want to move them from Row1.

What you can do to remove zeroes is following:

  1. Column List Loop Start node which will take one column in each iteration
  2. Row Filter node which will filter rows which are zero
  3. RowID node to ensure every row has same RowID (Row0)
  4. Loop End (Column Append) which will append your results

Try it out :wink:

Br,
Ivan

knime%20forum

I’m getting errors with the row filter

column range filter input table doesnt contain specified column name

even though there is a column name !!!

Hi!

Not sure what your error is but in Row Filter node you should use flow variable currentColumnName which is created by loop. This way your column to test in Row Filter node is your current column in iteration. See image.

image

In general you should play around with it a bit. Read node descriptions carefully and understand how it works. First try without loop and with one column only. When you manage to do it then add loop and other things :wink:

Br,
Ivan

1 Like