Hello,
I got the following issue.
I want to count occuring values.
I the value in the next row is the same, the counter should not add +1.
Does anyone know how to realize that in KNIME.
I could write python, but want to avoid that.
Thanks.
Hello,
I got the following issue.
I want to count occuring values.
I the value in the next row is the same, the counter should not add +1.
Does anyone know how to realize that in KNIME.
I could write python, but want to avoid that.
Thanks.
Hello @bzm9ba
2 Options
Replicate your column by using String Manipulation [ join($Counter$) ] >> $new column$ (or with a âRule EngineââŚ). Then you can test with âGroup Byâ node; by including both $Value$ and $Counter$ columns in:
Group Settings (Groups Tab) >> Group column(s)
and âAggregation Settingsâ $new column$ âCountâ
âGroup Byâ node; by including only $Value$ column in:
Group Settings (Groups Tab) >> Group column(s)
and âAggregation Settingsâ $Counter$ âUnique Concatenate with countâ
The resulting matrix will give you different displayâŚ
BR
Hello Thanks for the suggstion,
but that is not the issue.
I want to generate the counter column, based on the Values.
OK, but initially I do not have the counter column.
I want to create the âCounterâ column based on the âValueâ column
I got it,
Starting with $Value$ and generate $Counter$
Few more minutes to put it in niceâŚ
Yes sorry,
I didn t find a way to modify my post
Hi @bzm9ba
I guess this answers the challenge:
20220920_sequential_and_consecutive.knwf (54.2 KB)
BR
PS.- Forgot to activate âResolve missing values for incomplete windowsâ 's check box in âMoving Aggregationâ node, as control for the last row.
Seems like you could also use a loop approach as seen here, but use the iteration number +1 as the count instead of moving average.
You would have to group by consecutive as well though.
Not as clean as I envisioned because of the need to apply the group loop to sequential occurrences only, but it was still a fun loop approach to test out.
consecutive_counting_rank.knwf (59.8 KB)
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.