Filter middle 60% results

Hello,

I have to filter my results ordering it by an integer column and then filtering the top and inferior 20% just to get the 60% (the middle).

I'm a Knime beginner and haven't found any solution!

Yours,

Julien

Try using the Partitioning node under Row and Filter,  choose Relative, and 20%, and choose to take from the Top. The output from the bottom port will contain your dataset, minus the top 20%.

Separately, Sort on your integer column in the reverse direction, and again use the process above. The output from the bottom port will contain your dataset, minus the bottom 20%.

From each of the bottom ports, connect to a Reference Row Filter node, and choose to Include rows from Reference Table. This will now give you the middle 60%.

Simon.

1 Like

Thank you so much, it worked fine !

A very flexible alternative is to bin your values using the "auto-binner" node's "sample quantiles" setting, followed by the "nominal value row filter". This way, you only use two nodes (three if you want to throw out the additional bin column), and you can mix&match any percentile ranges you deem convenient.

A single-node alternative to this is the "rule-based row filter". One tool, many convenient options. :-)

Cheers
E