Hi,
I liked this one. Thanks for such a question. It was somehow challenging and made me think for a few minutes!
Here is the workflow:
Input:
Output:
I converted the MSU values into columns at first. Then 2 loops: One to loop over date columns and second one to loop over every 4 rows of data (as there are 4 unique values in MSU column).
The Column Expressions creates the “Date” column based on current column name and puts the values for MSU columns from current column (of date columns).
Column Filter node excludes MSU and the current column (the latter is set in flow variables tab).
And finally the GroupBy node aggregates rows based on Type, Category and Date and uses “Sum” function on MSU columns (Type based aggregation).
transpose.knwf (43.6 KB)
Best,
Armin
P.S. Sorry! I forgot to delete the Math Formula (Variable) node. It does nothing in this workflow. (I was going to use the iteration number of the first loop but then I changed my mind)