TRUE or FALSE in a new column under conditions

Hi

i d like to know if there is a function in knime to simulate same function in excel =cellA=cellB and the result is a new column with TRUE or FALSE

Thanks

Regards

Hi @Pippobaudo89

You can do this in many ways in KNIME. To name two:

A Rule Engine whereby

$column1$ = $column2$ => "TRUE"
TRUE => "FALSE"

A Column Expression can also be used via:

if (column("column1").equals(column("column2"))) {
    "TRUE"
} else {
    "FALSE"
}

Hopefully this provides some inspiration.

WF: TRUE or FALSE in a new column under conditions.knwf (16.5 KB)

2 Likes

thanks so many…

i tried with rule-based row splitter (i love splitting data) with the same formula (comun1=column2 => TRUE)

but it doesn t work. You know why?

Thanks

If you entered it into to Rule Splitter as you wrote, it indeed does not work. Anything rule based needs to consider the columns as ‘variables’, so $column1$ = $column2$ => TRUE
is the correct way of writing.

Tip: add the columns from the Column List, that way you ensure proper usage of them.

1 Like

OK THANKS. but i wrote exactly as you decribed in your reply but it doesn t work…

ook i got it… i wrote the double // so it is the reason why it doesn t work!!!

thanks

Yes, those are to make comments.

1 Like

THANKS

sorry if i ask you, may you help me with this other task?

It s the last topic, i swear

thanks

Alternatively you can use column comparator for comparing if true or false
br

1 Like

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