Partition of data by a condition & Selectively changing the values of a column

Hi All,
I am relatively new to knime and I have a dataset with columns like Brand name,Units etc. If the data is of particular brand, let us say brand 1, I need to divide the units columns by 5 and rest of the data should remain the same.Could you please help me in achieving this

Hi,

check out Rule Engine node. It should do it.

Br,
Ivan

1 Like

Thank you for the response ipazin. But I am still not able to get what I wanted .When I am using Rule Engine node with the below expression

$Product$ =“Brand1” => $Unitsby5$

all the remaining values are becoming blank. How can I make sure that only those rows which satisfy the condition $Product$ =“Brand1” is changed and rest of the rows retain the prior value.I also tried to use a NOT Equal TO but I am not able to find that operator in knime

Hi!

That is how Rule Engine Node works. It goes row by row and examines rule you have entered. From description from link above:
"If no rule matches, the outcome is a missing value."

To avoid that you can use TRUE => $Product$.

Also "The first matching rule in order of definition determines the outcome." so you need to place above rule after the first one.

Br,
Ivan

1 Like

Awesome! >i dont know how to thank you enough.saved my day!

Since you are so good :slight_smile: ,it will be of great help if you could look at the below question of mine.Please comment if my request is not clear

Hi!

You are welcomed. I have seen it and it is not completely clear to me what you need to do but try using this same logic. If you do not succeed I can take a look tomorrow or someone else eventually will :wink:

Br,
Ivan

Thanks Ivan.I have solved half of that problem myself and reworded the pending questions.You can see that here