Multiple Rules Not Working in Rule Based Filter Node

Hello all, I’m new to KNIME and I have a similar problem with @odiaz2309 in this post after following his solution, I’m still not getting the desired output. I’m using the KNIME 5.2.5 version, I downloaded in June 2024.

What I want to do is to filter for records with 25<=age>=35 and work class is self-employed or a government worker. I’ve attached a sample workflow and the dataset.

W6 adult.csv

MULTI RULE BASED ROW FILTER.knwf

It seems only the workclass rule is being followed when I use the code below.

($age$>= 25) AND ($age$ <= 35) AND ($workclass$ LIKE "*Self-emp*") OR ($workclass$ LIKE "*gov*") =>TRUE
TRUE => FALSE

I’ve also tried

($age$>= 25) AND ($age$ <= 35) => TRUE
($workclass$ LIKE "*Self-emp*") OR ($workclass$ LIKE "*gov*") =>TRUE
TRUE => FALSE

And that doesn’t work either, the results seem worse.

I’ve checked other articles but still not sure what I’m doing wrong. I’ll appreciate all the help I can get. Thanks.