Multi row formula in knime.

I’m new to knime and I am trying to migrate an alteryx workflow to knime.
However I am not able to find a tool to do the needed.
PFA the screenshot, I am trying to group by ‘Mix’ column and applying the mentioned formula on a particular group.

I am creating a column ‘new start date’ based on ’ start date’.
The ‘new start date’ is the expected output.

PFA the screenshot for the formula I want to apply on knime.

Here, In this formula there are 3 conditions, in the 2nd condition I need to access the previous row of end date and want to call the column ‘new start date’ in the formula itself.

Please suggest how can this be done in knime.
I can’t find any node which can group and apply multi-row formula, and can call the column that we are currently creating.
Do you have any suggestions on how to solve this?

Hi @Ankisha

Do you happen to be a colleague of Hammy? That data looks very familiar :slight_smile:

There are some pointers in the above topic related to group loops and column expressions that should get you in the right direction.

Hi @ArjenEX I tried group loop start which is mentioned in the article but its taking too long.
Is it possible that we can achieve this in the column expression itself?
Also, I need to apply multi - row formula( accessing previous row) on the created column i.e ‘new start date’,basically I need to call the column in the formula that I am currently creating as shown in the screenshot above.
How can I do it on knime?

Hi guys!

Sorry about the question, but i believe that you can use de group node to specify which columns will be the references and others to make a count link sum and others…




With many types of count expressions:


What do you think? Can be a solution for you?



Hi @denisfi I have already tried this grouby node in knime, but this does not serve my purpose, i need to apply formula on a particular group in a loop format, first i need to group then I need to take one group at a time and apply my formula on it then move to the next group.
I tried doing it by chunk loop node or by group loop start node but its taking forever to run which was hardly taking few minutes in alteryx.
Also in alteryx the column that is being created currently can be called in the formula but in knime I cant find any node which can do so.
Hope I am clear about my requirement!

Hi Ankisha,

Well, you can use 2 loop types for it… follow these steps:

1- first at all, order your columns befor the loop session, its pretty important for some types of loop;

2- You can use “Group loop start” to specify 1 or more columns to define a master group like SQL. Example: Date + Category + Sessions

3- Inside this loop, you can make your formula with “Groupby” or add another loop to start your process, breaking in pieces your flow. Example: Chunck loop (for split by number of lines or number of split sizes) or “Generic Loop start” with variable loop end for validate your conditionals.

4- You can use Rules nodes to “test” your conditional and set a new field or chance an exists one…

I hope that my explanation could be clearly for you… try it and give some reports as you wish.



Hi @denisfi PFA the screenshot for your reference, I have already tried this approach it is taking forever to run , I need some solution which can speed up this process.

two points to be noted here:

  1. I need to find a solution which can speed up this process of applying formula to a particular group at a time.
  2. Need a solution for how I can use the column that I am creating in the formula itself, Plus how can I apply the multi row formula on the column that I am currently creating, the way I am doing it in my alteryx multi row formula.

    I need to apply this kind of formula but its not working for me, as it is not allowing me to call the column that i am creating currently.

Do you have a demo flow to share?

You will need to find another way to reference existing values in your formula results then self referencing a newly created column. It will require a multi-step approach using the Column Expressions node.

Can you bring a example/flow with some fiction data for it, but with the same structure?

I believe that the group loop can be used with other rules node to check and set up a new field for you, simple you logic operation.



Try this node instead rules-based row-filter. You’ll have different options to use and can put some steps to set up the value as the example at the print above.



Hi guys,

Knime have a book that say all about alteryx and Knime!

Maybe it can help you to make a nice flow with less gaps/problems.



1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.