Select rooms by phase

Hi there,
I’m trying to separate rooms by their phases in order to calculate the perimeter just of the new rooms.
Thanks

you can use GroupByKey node