It’s funny that you ask, after posting I had this idea on how to generalise my solution and I went to the “kitchen” right away. Here it is:
split into mean and kind columns
unpivot everything into a single column, no extras
calc mean for each group
reunite columns (resulting table has empty rows)
This is not what I had in mind, however. Story thyme:
While reading your question, I had this spark in my head: Group Loop Start. Except that it groups rows, not columns. I would have to emulate that behaviour, so the obvious way was to extract the column names, boil it down to the groups, and use a Table Row to Variable Loop Start instead.
Then I could filter the table to one group with that variable.
Not sure how I’d have continued then. I wasn’t even aware of the postfix filter or the 1-row shortcut at that moment.
It might be useful though. Now I know the logical thing would be the unpivot node, but that guy doesn’t even need the Group Columns Loop mechanism.