Apply Filter Schedule to Respective Room Number

Good Day, for today I was trying to set a unique Filter to each Schedule Instances. What I want to do is for every Room Schedule I want to automate applying the filter to all instances. Images presented represents what I want to do and the fail attempts. I’m stuck at this please help.


This is what I want for the outcome


This is what happens when I am attempting


Here is the graph.

Solved by using Sort.ByFunction