Help hot make a roll up


#1

I’ve made a database for invoicing.
Im trying to figure out how to make a roll up to to check the average amount of days my clients are over or within payment terms.

I’ve got my set up like this.

Client —> Product —> Invoice

Client:
I’ve got the payment term for each customer in Client in amount of days.

Product:
Each product has a client assigned to them - and the payment term is carried over by a look-up from ‘Client’

Invoice:
In invoice I choose all the products I need for my invoice and the and I have a roll up of the payment terms from product.
I then have a calculation field (call it [days]) to show me based on invoice raised and invoice paid how many days the customer is within or over payment terms.

My problem is I’m trying to make an average rollup back in the ‘Client table’ to tell me whats the average of all [days] pr client.
But can’t make a roll up in Invoice directly from Client, as the client names carries over from the look up in product.
Is there a way to ‘reverse’ the roll-up back into client?