Items by level regardless if they occur or not

Hi, I am arranging a dashboard for a project showing by level how much area there is and occupancy etc.

I have managed to list everything i require such as “Level”, “Room area”, “Areas” and “Occupancy”.
Below are the elements I am achieving:

[0]
–[0]Level
–[1]Room Area total
–[2]Area total
–[3]1 BED total
–[4]2 BED total
–[5]3 BED total

Once I list these values I get the following:

[0]
–[0]Ground Level
–[1]123
–[2]349
–[3]2
–[4]1
–[5]1
[1]
–[0]Level 1
–[1]163
–[2]459
–[3]2
–[4]2
–[5]1

etc…

Which is fine.
But when I want to sort these with added levels where “Room area” or/and “Occupancy” don’t exist but say “Areas” do exist the whole list for that level doesn’t come through.

For Instance, if I added a “Parking Level” to the project which has no “Room area” or “Occupancy” i want to list this level regardless as I want the “Area” (which does exist) to still come up. example below in bold below:

[0]
–[0]Parking Level
–[1]0
–[2]600
–[3]0
–[4]0
–[5]0
[1]
–[0]Ground Level
–[1]123
–[2]349
–[3]2
–[4]1
–[5]1
[2]
–[0]Level 1
–[1]163
–[2]459
–[3]2
–[4]2
–[5]1

I hope that makes sense. Any help would be appreciated.

Hello, this is hard to tell without any graph, but if you make use of custom packages, some ReplaceNull nodes in Clockwork or DanEDU Dynamo could possibly help…

The graph below seems extensive but is structured so values are listed by level.

I have introduced (in blue) a list of all “Levels” as a starting point to become the way everything else is sorted regardless if values exist at that level or not. It might not be useful but this is where I am at.

The values I am after are in the orange, green and yellow boxes. These list just fine once exported to excel however, as my previous post raises, when I add a level without all these values available on that level it throws out the whole final list.

Hope this makes sense.

Here is the complete workflow (waiting for your feedback :slight_smile:) :

List.SublistLengths and ReplaceNull are from Clockwork
KVList.FillNullToLength is from Chynamo

Thanks for the response, with that graph though I would have to specify if a level needed to go on the end or beginning of a list. I have a project whereby there are multiple levels in between various “typical” levels which I would still need to list, such as “Plant” or "Parking Level"s for instance which would be at the beginning and simultaneously at the start.
I want to make this useful for multiple projects that would have various level arrangements but I could still attach a value too whether it be 0 or 1.

This should work (List.ReplaceEmptyLists is from Clockwork also):

To sum up, List.AllIndicesOf returns empty items where needed, I replace these empty values by a ‘null’ value, that’s why List.GetItemAtIndex returns a warning, but also a list that should be complete and in the expected order. After Replace Null, you get at least one value per level.
I would have to search a little bit more in my notes to improve this if needed (something with List.Map maybe).

Any feedback welcome…