filter dates based on a condition

Hi, I am trying to use rule engine to filter rows that has a certain date

Filter all rows for plans 9015 and 90109 and Date = 17Jan2023
I ahev used Date&TimetoString node to convert this date to string

I am trying to use rule engine
$PLAN_N$ IN (90105,90109) AND $PAY_D$ =’ 2023-07-13’ => TRUE

I am trying to exclude a set of rows that belong to plan 90105 and 90109 and have date =17Jan2023’

Please help

Try replacing AND with &&

@rfeigel it did not work

I want to exclude a set of rows that have Date =‘17-Jan-2023’ in plan 9015 and 90109

Can you post your workflow?

PLAN_N PAY_DATE
90105 01/17/2023
90105 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90109 01/17/2023
90105 01/17/2023
90105 01/17/2023
90105 01/17/2023
90105 07/13/2023
90105 07/20/2023
90105 03/09/2023
90105 01/05/2023
90105 04/20/2023
90105 11/30/2023
90105 05/04/2023
90109 06/08/2023
90109 10/26/2023
90109 07/06/2023
90109 10/05/2023
90109 09/07/2023
90109 01/12/2023
90109 01/19/2023
90105 02/09/2023
90105 07/27/2023
90105 11/02/2023
90105 05/11/2023
90105 05/18/2023
90105 04/27/2023
90105 11/16/2023
90105 02/23/2023
90105 04/06/2023
90105 06/15/2023
90105 06/01/2023
90105 10/12/2023

There may be more elegant ways, but this works.

2 Likes

Hello @chaithuj and @rfeigel,

there is Rule-based Row Filter node that should help in these cases.

Br,
Ivan

1 Like

Hi @chaithuj , your rule was close, but you need double quotes rather than single quotes.

As @ipazin mentions, row filter/splitter and rule engine are combined together in the Rule Based Row Filter and Rule Based Row Splitter nodes.

You’d then have it return FALSE or TRUE

$PLAN_N$  IN (90105,90109) AND $PAY_D$ = "2023-07-13" => FALSE
TRUE => TRUE

which would remove the stated rows, if set to exclude FALSE.

1 Like

Hi @chaithuj,
for additional info
using row splitter allows you to send the true mach to the second port and you use the first port or vice versa. The advantage of using the row splitter is you can track if your filter works as expected.

BR

2 Likes

I’ve uploaded a new workflow which has the three different approaches discussed in this thread plus the new Row Filter (labs).

3 Likes

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