Create new column base on another column

I have a table that looks like this.
I want to create a new column that gives a heads-up when there is a missing general role for each role.
In this case, we are missing HR_CLERK for the interation 0, so I need a table output that indicates to check the incomplete role.
I’m not an expert in knime yet but if someone can guide me I would appreciate the help.

Hi @vargas7 and welcome to the KNIME forum community,

An easy way of achieving this “heads up” on missing values is to use the -Rule Engine- node to generate a new column or the -Rule-Base Splitter- node to separate rows with missing values in this columns.

In the -Rule Engine- node, one could in your case write the following:

(MISSING $T number$) OR  (MISSING $Last Name$) OR (MISSING $Name$)  => "Check the incomplete role"
TRUE => "OK"

In the -Rule-Base Splitter- node, the syntax is as follows:

(MISSING $T number$) OR  (MISSING $Last Name$) OR (MISSING $Name$) => FALSE
TRUE => TRUE

Hope it helps. Otherwise please reach out again and we will help you further from there.

Saludos,
Ael

4 Likes

Hello Ael,

Thank you for your answer, however, this approach will give a “heads up” in line #2 but the ROLE is also through line 6. So if there is any missing value in the T number in any general role we may need to mark all other general roles from that specific ROLE. I hope it makes sense, thank you again!

1 Like

Hi @vargas7

There’s multiple ways to achieve this and in addition to what @aworker proposed, you could also try the following:
forumMissingVal.knar.knwf (12.6 KB)

Of course, you’ll have to adapt this a bit, it’s just meant an example of how it can be achieved.

4 Likes

It worked, easy solution! Thank you! :smiling_face_with_three_hearts:

3 Likes

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