Thank you for looking at this! I meant to say in original post that my plan was to sort by earliest end time, then use INDEX function to iterate through courses. So we are on the same page there.
Looking at your viz, you are filtering by day of [END DATE] to make the window view be based on the day of the week. Besides INDEX(), the only other calculation added is Class. The result of the calc is correct--the OTHERS set contains the optimal class schedule, but I don't understand how that is accomplished without any use of end time. (probably there is something obvious staring me in the face, but right now I'm not seeing it :-)) Also, I see what you are saying about the overlapping courses for Class 2 ending at 4:20, and I'm looking at why it occurred--thinking it's just too many dates going on in the original viz.
Can you explain how your calculation is working?
I used rank_unique and restarted every end_time to number the courses ending at a particular day/time, then added a calculation that evaluated the rank number against the total rooms available for each class size.
For example, there are two rooms available that will seat up to 80, so: IF RANK_UNIQUE=1 THEN <classroom#1> ELSEIF RANK_UNIQUE=2 THEN <classroom#2> ELSEIF RANK_UNIQUE>2 THEN <slack>
This works only if no end times overlap the following start time. I had one instance of that and adjusted it manually rather than re-writing the calculation--although I will rewrite it for future use.
If you have any other thoughts feel free to share!
Thanks you again for looking at this with me!
Classroom Moves3.twbx 130.4 KB