Grouping lists based on identical values


It’s been almost two days now of me trying to create what at first seemed a very simple tool.

The graph is intended to extract specified parameter values from family instances and populate existing excel file with them. Now the whole principle is very simple, what I am struggling is formatting and grouping the data before it gets exported into excel.

The lists of values extracted from family instances should be grouped together based on identical values in “Risk Category” parameter, this is to keep similar risks under the same heading in the excel.
The approach I’ve taken is to use filters with x == unique identifier rule to create nested lists of same categories. The problem is that “risk category” unique identifiers can vary and the graph should be able to create filters and iterate family parameter lists through it based on the “risk category” parameter…

I sense that this will require loops, but just can’t get my head around it.

Here’s a portion of the graph where I got stuck,
the output I need would be two nested lists containing all lists containing 01 PILING and 02 MAINTENANCE respectively:


List.GroupByKey :wink:
(And List.SortByKey if you want.)

1 Like