Count Sequential Occurrence of consecutive Values in a Column

Hello,
I got the following issue.
I start here:
grafik

and want to reach this:

grafik

I want to count occuring values.
If the value in the next row is the same, the counter should not add +1.
If the value changes it should count up, based on the previous value.

Does anyone know how to realize that in KNIME.
I could write python, but want to avoid that.

Thanks.

Hi @bzm9ba
This is just annoying, as the posted result in the other topic was deleted…

I think that this workflow achieves the desired result:

20220920_2_sequential_and_consecutive.knwf (54.1 KB)

BR

1 Like

The previous version had a bug… you can appreciate in Row3 x $rank$, given by an empty $prediction$ value in the in the latest row, then replacing the 3rd row.

This new workflow deals with last row issue.

20220920_3_sequential_and_consecutive.knwf (61.8 KB)

BR

3 Likes