Hi folks. I’m having a nightmare with a basic problem. I’m looking to add 1 to the previous value of a row if another column in that previous row has the same value as the current row.
I’ve tried to do this with column expressions using the following formula:
Hi @gianmalio , the reason for the error is because you haven’t activated the multi-row access in the Advanced tab.
But even so, with that script of yours, you’ll get a new error:
“Reference error: ‘column0’ is not defined (line 2)”
You might want to revisit your script, since your current one is querying a value from a column that doesn’t exist yet. Another issue is that you mentioned the rule of “if another column in that previous row …”, but in the script you showed, you’re matching the same columns instead, just in different rows.
You might want to dig more on the forum since there are many threads about Column Expressions.
If you still need help, it’s better to upload a workflow, and then an Excel screenshot of how your output will be like so people can replicate the outcome in Knime.