This formula gives me for each loan, the maximum days in delay, grouped for each client. So if a client has 2 loans, both loans will appear with the same days in delay.
But, now I have a different problem, I have to exclude loans, that are closed from this aggregation.
I am checking if the loan is closed with the following formula :