Rule Based Row Filter is not working

I have used this one to remove the invalid age entries. But as you can see, the appended table still has those data.

Hello @Annto_Joy and welcome to the KNIME community

Do you know to @Ammar_74 ? It looks that you both work in a very similar data set :upside_down_face:



Hi guys,

As I could see, the column “Age” is a string type, not a number… the rule node check the math expression for compare string as a number wont work. You need to change the column type before it… just use the string to number node to change it… It’ll works





Hello Sir, I did that but still it didn’t worked. Can you suggest me some other, solution. I also uploaded the data file for your convinence.


Hi @Annto_Joy

You can get this working by using String to Number and the Rule-based Row Filter.

Select output type integer

Use the rule as you already defined before ($Age$ > 0 AND $Age$ <= 120 => TRUE).

The number of records went from 100000 to 92376 accordingly.


Hi @Annto_Joy , it looks like the post by @ArjenEX should give you what you need.

But I think it’s worth highlighting that (ignoring for a moment the issue of the necessary data type conversion), the OR condition in your first post would match ALL ages (even those outside the range 1 to 120), since all numbers will match at least one of those two conditions, hence this needs to be changed to AND as per the supplied solution by @ArjenEX .

In the post referenced by @gonhaddock , I can see that the rule written by @Ammar_74 does the opposite and finds no matches because it used an invalid AND condition (which seeks to find an integer that is simultaneously less than zero AND greater than 120). So it looks like you may both need to double check your use of conditional logic, and then it should hopefully become more straightforward.


Hi guy,

I saw your csv file and the column for age have some data error, because of it, some problems will occur to filter too.

Could you make a clean before use it? examples for this column and others that maybe you will ask about in the future:

Well, I made this example for you and I hope that help you.


Rule Based Row Filter.knwf (13.8 KB)



1 Like

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