You have input data from a spreadsheet, so it is highly denormalized (flattened), so you want to provide some nested structure back into your data. You group by your primary key element(s), and suddenly all the detail data looses its association.
In this example, I have entries of quarterly data from a spreadsheet in which each row has
(opportunity, lead, category, phase ,amount, period). I want to group the feed by opportunity, but I want to retain the association between period and amount within the grouped opportunity.
What you need to do is to first use a transform to group the detail data, then perform the grouping so that you can drag the newly grouped data as your "associated data" together in one element.