Filtering missing value with Row Filter

I am trying to filter row with missing vlaues in 4 different colums. The filter does not behave as expected and I have no clue why. Can somebody help?

I think right now you keep any row where at least one of those four columns is not missing.

e.g.: A - B - C - MISSING => stays in the data set

You you only want to keep those rows where NONE is missing, then switch the filter mode to All criteria at the top I think:

1 Like

or use a splitter node and set it up with “is missing” and any.
and then use the 2nd output

2 Likes

Hi @dataloca , @MartinDDDD and @fe145f9fb2a1f6b are correct in each of their responses, but I wanted to add to what they have said because I think that you were possibly confused by what amounts to the “double-negative” that you have created in your configuration.

This is what you say you want:

Remove rows that have missing values in any of the 4 columns

But this is what you told KNIME you want:

Keep rows where there is not a missing value in ANY ONE of the 4 columns.

As @MartinDDDD you can simply change the configuration that you have by setting “All criteria” which changes the meaning to:

Keep rows where there is not a missing value in ANY of the 4 columns

However, to more accurately configure KNIME to match your statement
“REMOVE rows that have missing values in ANY of the 4 columns”

… you would leave the option set to “Any criterion”, change the operator for each column to “is missing” and then set the “filter behavior” at the bottom to “Output non-matching rows”, which effectively means “REMOVE” instead of “KEEP”.

Maybe the node config would be a little clearer if that Filter Behavior were labelled “Keep Matching Rows” and “Remove Matching Rows” :wink:

Of course, this solution is logically the same thing as the solution already offered by @MartinDDDD , and semantically the same as the solution offered by @fe145f9fb2a1f6b which uses the Row Splitter node instead to perform the same operation.

For clarity, this is what it looks like:

2 Likes

Working! Thanks a lot to you and @MartinDDDD and @fe145f9fb2a1f6b for that quick effective response :slightly_smiling_face:

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