Node for grouping a list and summing it's values

Hello,
What node do i use to group a list based on it’s name and sum the values. Foristance in the attached picture, list 25 (CL Concrete_panels) and list 26 (concrete, cast in situ) would be combined under one list concrete and their sums (63.757 and 60.328) be summed

I have attached my dyn file for more reference

summaterials.dyn (27.9 KB)

Hi @smrema ,

See if something like this helps you out:

Just make sure the Code Block contains all the unique material-keys you could have.

2022-05-24 Group and sum by key.dyn (13.0 KB)

1 Like

Thanks @Daan it’s working :smiley: