I have a list with subsets consisting of (2) items each (Item 1 classified as “Department” and Item 2 classified as “Area”). I am trying to group like department names and associated areas to eventually calculated total department areas.
I am not sure the best way to sort the data to accomplish this.
Group by key, and sum should work for you
As @Jonathan.Olesen said, group by key and then taking the index of the areas and summing it will work. When you group by key, you need to take the department names and use them as keys, like shown below:
add a transpose node after the list in codeblock for lesser usage of levels but @kennyb6 solution works fine too if you understand how levels in nodes work
Thanks to all of you. each suggestion was helpful. Solution below.