GroupBy issue over 3 tables with different column names

Hi guys, this is my first post in this forum, so I apology in advance if something is not correct.

I have issue, that I have 3 similar tables - only change in each table is name one column. And I would like to loop over all three tables and make “GroupBy” with that column. But it doesnt work, because in second looping the name of that column is different. For example this column in table1 is named as “Setup Flat Fee”, in table2 is named “Local Fee” and in table3 is named “Participand Fee”.

Please is it possible to do that GroupBy somehow flexible? If it helps, that column is in source excel file in column “G”, so its position is fixed.

Thank you in advance, Marcel

Hi @MarcelF

Just to clarify: the dynamic column that you mention, is that used as grouping column or as aggregation column? The former can be controlled via a flow variable while the latter by Pattern Based Aggregation.

oh you are right, its as aggregation column (SUM). Could you please help me what to write into “search pattern”? All three columns contain word “Fee”, however I am not familiar with that RegEx rules…

Thank you in advance

If you know the columns names in advanced, I would just use them in full: .*(Setup Flat Fee)|(Local Fee)|(Participand Fee).*

2 Likes

Thank you, this is what I was looking for! Thank you very much.

3 Likes

No problem! If it helped you please mark the post as solution so that other KNIME’ers can also benefit from this more easily in the future :slight_smile:

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