Support on the Rule Engine tool [ Basic level]

Hey Guys

I just need to add a column based on the following criteria:

if($DRIVER_AGE$ <= 21,"[0 - 21]",if($DRIVER_AGE$ <= 24 AND $DRIVER_AGE$ >= 22,"[22 - 24]",if($DRIVER_AGE$ <= 29 AND $DRIVER_AGE$ >= 25,"[25 - 29]",if($DRIVER_AGE$ <= 34 AND $DRIVER_AGE$ >= 30,"[30 - 34]",if($DRIVER_AGE$ <= 64 AND $DRIVER_AGE$ >= 35,"[35 - 64]",[65+])))))

Just let me know please what iā€™m doing wrong.

Thanks in advance.

Hi @Anas,
you have to write this in Rule engine:

$DRIVER_AGE$ <= 21 => ā€œ[0 - 21]ā€
$DRIVER_AGE$ <= 24 AND $DRIVER_AGE$ >= 22 => ā€œ[22 - 24]ā€
$DRIVER_AGE$ <= 29 AND $DRIVER_AGE$ >= 25 => ā€œ[25 - 29]ā€
$DRIVER_AGE$ <= 34 AND $DRIVER_AGE$ >= 30 => ā€œ[30 - 34]ā€
$DRIVER_AGE$ <= 64 AND $DRIVER_AGE$ => 35 => ā€œ[35 - 64]ā€
$DRIVER_AGE$ >= 65 => ā€œ[65+]ā€

Luca

4 Likes

you can also try out the /Numeric Binner node, there you can define these rules as well.

4 Likes

Thank you Luca!! Gotta get used to this

Thanks Iris

This will definitely be useful later on!

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