How to convert from this collection:
to like this:
No, this is not possible. Tables (like almost everything in Power Apps) are strongly typed, meaning that it has a well-defined schema that can be referenced within formulas. Since the values from the collection are not known ahead of time, then you would not be able to reference them in the formulas.
You may be able to use something like the GroupBy function to create a collection similar to the one below:
(Only because I had the data already mocked from a previous answer :) )
UI: Nested Gallery
PowerFX: Exactly as @carlosfigueira mentioned
Assuming
colData
is the data shown in original postgalParent
toGroupBy(colData, "principalDisplayName", "group")
galChild
toThisItem.group
Visual