# Matching yes/no values with area values and group per unit

So, I’m trying to convert a schedule to excel but in a specific way.
I have 2 types of terraces, some apartments have 2 terraces and have 1 of each type which means the schedule looks like this:

unit 4D0.2 has 2 types of terraces and so has 2 different/separate area values.

When I convert this tho excel I will have something like the ABC columns but my goal is to have something like columns EFG. The goal is that I only want 1 line for unit 4D0.2.
Afterwards I want to be able to replace the yes/no with the area values of the corresponding units like columns IJK

I started messing around with the lists a bit but I don’t really know how to start…

test oppervlaktes terrassen.dyn (55.4 KB)

i am not sure 100% but try to use this concept

@khuzaimah.ElecEng Thanks, the first part really helps, but I still don’t really know how to combine them in 1 list or multiple lists…

@khuzaimah.ElecEng I’m actually almost there, I combined the lists so that it can fill in ‘x’ if it doesn’t have the type, but I don’t really know how to reduce the part in red to only the 2 values…

hi, that is good, use Unique Items node @level 2

@khuzaimah.ElecEng thanks, but that doesn’t work, I need the 2 x’s to be gone and both the values to stay (the 2 terraces have the same area)

Use == node to get Booleans and by FilterMask get rid of x’s.

1 Like

i have used python to remove x if there is more than 2 types

``````import clr
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
type1=IN[0]
type2=IN[1]
list1=[]

for ty1,ty2 in zip(type1,type2):
if len(ty1)>1:
for t1,t2 in zip(ty1,ty2):
if t1=="x":
ty1.remove(t1)
if t2=="x":
ty2.remove(t2)
list1.append(ty1+ty2)

#Assign your output to the OUT variable.
OUT = list1``````
1 Like

@Deniz_Maral i don’t want to get rid all the x’s, only the one’s I crossed in red

Use the node == x
And then list.count true, with > 1

Then use that information to filter only the lists which have too much x