Variable loop with group by where variable determines new column name and type to count

Hi Knime-Team,

I am struggling to create a variable loop with a group by node wheraes the column name for the count results and the string to count in each iteration is determined by the variable. Attached the not working workflow which may clearify what I am aiming for. Hope someone has an idea.

Thanks a lot

Let me understand better. Where would you like to apply the variable in the GroupBy node?