Loop/Variable ?

Hello Knime Community !!!

Can anyone help me on my workflow ?

I have this workflow where i simply sort the ‘Turnover’ column in descending and then rename the column and filter only the top 3 values.

I want to do it for every country seperately and write it on an excel file with a different sheet for every country. I don’t want to have same nodes for every country but some node which can link them so I just change the market somewhere.

Does anyone can help with the nodes i can use to do this ? (Variable ? Loop ?)

Don’t hesitate to contact me in case you have doubts or questions.

Many thanks in advance.



I would say a group loop using country and the top k selector node. You will need variables to rewrite your excel files as well.

Hope that helps~

1 Like

As @victor_palacios pointed out, you can use a Group Loop to isolate and operate on every Country separately:

  • Inside the loop you’d sort and filter and write to Excel.
  • You can use the Country variable output from the Group Loop Start to create individual sheets.