Alteryx Node Multi Row Formula to Knime

Whilst Column Expression’s node is the closest match to the Alteryx Row Formula node, unfortunately I don’t actually think it would be the solution in this case.

In the (Alteryx) Row Formula config, it is both creating the “Apply Ratio?” column, and referencing its value in the previous row. Whilst Row Formula can do that, Column Expression cannot (unless there is a very recent change I’ve not seen). Column Expression can be set to retrieve values from previous rows, but not for the Column it is creating. And if it is updating a column rather than replacing it, its “window” on previous rows appears to be the incoming data, and not the changes that it has itself made on this invocation.

NB… I would be very pleased to discover I am wrong on this! :wink:

The only node I know of which can set the value of a column based on the value it has set in that same column on a previous row is the Java Snippet.

@LukeParkes , are you familiar with java? The snippet would not be very complex to handle this, but does require some basic syntax knowledge. Arguably it is not much different to knowing the javascript required by Column Expressions node, and I tend to use it in preference. For info on how to allow a java snippet to reference the previous row’s value, see Java snippets have long memories!...

If you are able to upload a small sample data set (with anything confidential removed) hopefully we can assist in finding a solution for you.

2 Likes