I would like to count the number of consecutive values in the “Calc Vol” column that are above the constant value given in the “Upper Limit” column
e.g, here the count would be 2 as there are only 2 values above 22.95 that come after each other (rows 8 and 9). I’m only concerned about values above the 22.95 if they are followed by another value above the 22.95. Do you know if this is possible?
I think you should be able to do this using the Column Expressions node - available in the KNIME Expressions extension.
Connect the table you provided in your screenshot to a Column Expression node. In the “Advanced” section of the configuration of this node, make sure you’ve enabled “Multi-row access” and select “Use ‘null’” for the first and last rows. Then create a new expression with the below configuration.
Thanks so much for your response, it helped a lot!
It’s very nearly what I am looking for; is there a way I can get the new “Count” column to count consecutive entries, i.e in the screenshot below at row 9 it would read 2, and then at Row16 it would read 2 again, but it would not read 4 as once the value falls below 22.95 the count refreshes again?
You could of course redo the whole thing with a java snippet, but to be honest unless performance is an issue, I’d stick to small steps that work to reduce complexity, and if the column expressions is working, then simply bolt this on the end.