Your calculation refers to Invoices::Date, Debit amount Total and customers::TotalInvoiced. That could be references to data in up to 3 different tables. In what table is this calculation field defined?
When a calculation references a data field in another table, it references data in the first related record. When it refers to a summary field from a different table the summary total returned is based on all related records.
In order for your calculation to selectively Sum records from a related table--which is what I am guessing that you are trying to do here, you need to use either:
a) a relationship that links to the correct group of records
thank you. i realized what the problem was and calculated the total in the correct table first before referencing it in the next calculation. all working now, thank you for the tip and quick reply