Hello everyone,
could anyone explain to me, why give the two ways (2 threads after the last constant value column) different results in the “OVERTIME” column?
Thanks in advance.
Regards,
Roland
columnexpressions.knwf (15.6 KB)
Hello everyone,
could anyone explain to me, why give the two ways (2 threads after the last constant value column) different results in the “OVERTIME” column?
Thanks in advance.
Regards,
Roland
columnexpressions.knwf (15.6 KB)
hi @rolandnemeth,
obviously you cannot reference the result of the first expression within the second expression. So ROUNDED HEADCOUNT remains constantly 0 for the second one. However, you can use the formula for your first expression within the second expression…
Thus, the results are identical.
Hope, that helps, Tommy
Hello @tommy,
I mean the two expressions cannot be merged in one, because in the first expression I want to give value in the column ROUNDED HEADCOUNT, in the second in a different column, named OVERTIME.
Maybe it can be formulated together inside an R/Java/Python Snippet node.
Roland
hi @rolandnemeth,
it’s possible to create both columns in one Column Expression node.
Please find the workflow on KNIME Hub…
You may define the ROUNDED HEADCOUNT as the first expression. For the second expression the formula for ROUNDED HEADCOUNT has to be repeated. However, you can save the ROUNDED HEADCOUNT in the second expression as a variable and reference the variable below.
Hope, that helps.
Tommy
Hello @tommy,
it works perfectly, thanks.
In my formerly answer I tried to formulated, that you cannot give value for two different columns inside the same expression (not inside the same column expression node).
Thank you again!
Roland
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.