Hi,
Depending on the query performance, you can use these options.
1.- You can use a service type and sum the hours of the table evt_dly to subtract them from the duration of opening.
2.- You can activate the kpi_ticket_data and subtract the sum of this table depending status.
3.- You can do a trigger to add the delays to custom variable.
Best Regards