Loop over rows

Hi guys,

I have a problem with a generation of a column in KNIME. 

I'm able to do that in Excel, but I have 4500000 rows and I would like to do that directly using knime. 

I have two columns: one with username and one with a double value. 

I would like to use a code like this: 

for (i in 2: nrows) {

if (username[i] = username[i-1])

New variable[i] =Variable[i]+New variable[i-1]

else New variable[i] =Variable[i]


Is there a way to use this loop in KNIME?

I tried to use Java Snippet but if I understand well, it works by column and not by rows...

Please help me <3








Hi Annalisa,

I've tried to perform it without using any loops or Java Snippet node. I think that should be fine as well.


- do you have a timestamp for each row?

- do you want to keep the value of the previous row for the repeted values? If not, you can use the Groupby node as shown in the workflow and aggregate for the last value

Hope that helps,