Volumes out of Lists depending on Parameter Values

Hey guys,
i have been around this problem for some time now, please give me another hint :smiley:
I want to get volumes from elements, that need to be filtert twice: first by 1 value (Zuordnung) to separate and afterwards by 2. value (f.e.the colour).
In the end i want the sum of volumes in each value 1 separated by value 2. Imagine rooms (value 1) that have furniture in it (value 2) but some sort of the same in every room. I want to have the volumes (maybe costs is easier to imagine) of each furniture-kind sum up but seperated into rooms. Hope i can get you around that.
I made it with lists so far, and the last list has the right structure

for every value 1 the right value 2 and volume,

i want to export to excel the correct volumes ant by getting them, i needs to be a simple as possible. To chop/slice the lists is not an option - this ist just the try for my project, with will contain much more data.

I already tried a lot, another close one was to take List.GroupBy.Key bit it only can be done one time and not in a row.

If i stick to one value each, i can make it work, but it needs to be done with more values.

Hope anyone can help.

You have to use GroupByKey with list levels so that your subgroups stay within the main group. Group by Value1 first so that everything is in the larger group it belongs to. Then group by Value2 (with proper list levels) so that the items in each larger group get sub-grouped by the second value.

Now it works! The problem is now, that the data exported to excel jumps through every Value 1 object and write somtetging, but overwrites ist the next moment jumping to the next. In the end in the excel there is just data from the last value 1 object.
Another idea ?:smiley:

Hard to say without seeing your updated graph.

Here are some screens after a long day of trying :smiley:


this is what comes to excel, when you have it open you can see, that he write all the other Areas too, but overwrites it in the process

Also in the end i want to have the numbers (Werte) for the colours (Farben) sum up for each area

Your list structure is not right. Excel requires a specific list structure to import correctly.

Turn on node previews so we can see all the data in your graph and export an image of your workspace (top right corner). Be sure you’re zoomed in enough so that text is legible.

this is the graph, that has the excel output that i send you above.

this is what i want
Endergebnis
The numbers are the sum of the colours in each area.

I don’t think Transpose is doing what you’re expecting here. You need to use GroupByKey to group the volumes by color (along with SortByKey to keep them all in the same order) and then sum up the total volumes. You’re final input for the Excel data must also be a @L3 list of rows (sublists) and columns (items within the sublists).

Hey, thanks a lot! Your way is working fine, only the real import out of the project is again not as simple as i hoped , but i came a lot closer with you help!