What about this? The key is aggregating on Value as a list in the Pivoting node, and then ungrouping that list. I guess you would want to do some cleanup on the column names too.
No grouping is required. KNIME will give you a warning message about that, but you can still execute the node so long as a pivot and aggregation is specified.
If you set the Column Name to Pivot Name under the Advanced Settings at the bottom, the proper column headers are generated so no renaming is required later on.
I tried to implement this further to be able to write subsets of data to different sheets of the same Excel file, but the flow stalls at the Pivoting node after the first iteration. It works fine in the bottom branch for just one data subset. I want to use the subset column name to name the different Excel sheet, hence the variable connections.
I have a mockup workflow in which the Pivoting node is working fine within a Column List Loop using some fake data. I’m not able to test your workflow since the data is not included (probably because it’s proprietary).
Do you have a dummy dataset that produces the stalling Pivoting node - using your workflow - that you can upload?
Here’s what I did. The Pivoting node was throwing errors because it was trying to transpose on columns that didn’t exist in various iterations of the loop. So I parameterized the Pivoting node with a couple of flow variables to get around that.