t_Shuttle
.Filter(
Airport = f_MyBooking.[Departure Airport] AND
Time >
(f_MyBooking.[Departure Time].First()
.DateTimeTruncate(
"minute"
) -
Hours(3))
)
.WithName(
n_RecommendedShuttle,
If(
n_RecommendedShuttle.Count() > 1,
n_RecommendedShuttle.First(),
t_Shuttle
.Filter(
Airport = f_MyBooking.[Departure Airport]
)
.Last()
)
)