Hi, so, I think that without start date per gate this will be very complicated...
I've attached an updated version of your previous file with proposal, including results which hopefully reflect the necessary transfer date logic (see 2152/2201), but which does require the addition of the start date per gate.
{note: I've not verified the results per se, and no expected results provided to validate against}
Even then, (i.e. with this concession on format of database table), the calculations are still very intensive (and filtering, for ex., would likely generate some lag)
If this approach proves unviable, either as a result of required format change or performance, I would suggest considering a User Defined Function.
for sake of disclosure in the thread itself, I've added first calculation for each of the 3 types (per attachment):
Bookmarks