How to count and group elements in a list for excel export

Ok, I’ve been working on this, my first graph, all morning- I’m exporting framing schedule from revit to excel via dynamo. Right now i’m getting the equivalent of ‘Itemize every instance’ i.e. every element is exporting seperately on my excel file.

What I need to do is group framing members that are the same by Length, count the number on instances and add the count number in an additional column.
I’ve tried searching around, and poking around with it myself (Grey group) but am unable to imagine the logic of what to do.
Please advice!

Schedule.dyn (27.6 KB)

Your nodes are illegible. Zoom in until you can read them and use the Export Workspace as Image button (camera icon) in the top right of your window.

You’ll likely need to use GroupByKey. You would get all your elements and their lengths. Group the elements by their length (key) then count the elements in those sublists.

Sorry about that.
I understand what you are saying in principle, but unable to lay it out!


You have everything in sublists by element right now. You need to get the list of elements (names) and the list of lengths. Either transpose your data and get the sublists or use GetItemAtIndex and list levels to get each parameter by sublist.

EDIT: Something kinda like this,

Thanks a lot, that got me closer to the solution!
Really appreciate the help on this forum.