I need to perform the following excel formula on a column of data:
=IF(LEN(B2)>6, B2, C1)
This formula checks to see if the length in column b is greater than 6 and if it is then it returns the value from the row in column B and if the value is not greater than 6 it returns the previous value in column c. How could I perform this with Java or some other tool?
Thank you for the response. I have tried this node but I don’t know how to retrieve the previous row value as designated by the “C1” value in the formula. Any suggestions?
In the Column Expressions node in KNIME 4.6, there is a column() function, and one of its optional parameters is an offset. You can use this offset to access preceding or following values in a column.
I apologize for my ignorance but I don’t know how to actually combine those nodes. I have tried using both but I guess i just dont see how to use them both to make the above said formula. I have been trying everything I can think of
so what you previously sent wasn’t quite giving me the correct results that I am looking for. In the image, the column “new_node” contains the formula I mentioned above. Is there anyway to achieve these results?
To supplements Scott’s answer in case you are working with strings, the Rule Engine formulation will not work then and you’re better off with a Column Expression checking for: