the default aggregation methode in the group by node for numbers is "Mean".
I am controlling the aggregation methode by a flow variable, which works quite well (see image1)
The problem is, that I don't know what size the array is. Automatically if there a 3 columns in the manual aggregation settings, it is 3 (like in image1). If there is another column added in the manual aggretation settings, it is 4 and so on.
Is it possible to set the whole array dynamically with the right value (summe_bilden), so that I don't have to do it manually (see image2).
another solution could be to use the type or parameter based aggregation. This way you can asign more then one columns an aggregation method e.g. all columns that start with col_ or simply all numeric coulmns. In the flow variable tab you then have to select your aggregation method only for the name/type based selector.
"To wrap the groupby into a loop" meant: when the array size cannot be determined in advance, use the "split, apply & combine" strategy:
- (split) column list loop start (choose your columns by enforcing exclusion but don't forget not to exclude your grouping variable such as e.g. "class");
- (apply) rename your variable of interest (using the currentColumnName flow variable) to e.g. myvar, then comes the groupby (define the aggregation manually for myvar), then again rename myvar back to the original name;
- (combine) loop end (column append), followed by a column filter (wildcard) to kick the excess grouping variables (e.g. "class (iter #*").
There is of course still potential to make this workflow more elegant ;-)
Hadley Wickham wrote an interesting paper on the split, apply & combine approach: