Java snippet/ excel if function

Hi,
I was wondering can I write this formula in knime ?

=IF(number>0, NUMBERVALUE(number), code)

I have few problems with it :
First of all my data “number” are text format and some values are missing . So I need excel formula - NUMBERVALUE, to correct it,
Next problem, I need the missing data from column “number” change to “code” values.

Maybe you have some advice for me how to do that?

Hi @laura1995,
the attached screenshots shows one possibility to solve it.

screenshot2

Br
Hermann

2 Likes

Hi there @laura1995,

welcome to kNIME Community Forum!

You can also use String to Number node and after that use Missing Value/Rule Engine node to replace missing values :wink:

Br,
Ivan

2 Likes

Alternatively, if you want to avoid Java snippets:

image

KNIME_project7.knwf (7.7 KB)

Edit: Ivan got here before me :slight_smile:

2 Likes

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