I'd use a calculation field such as you have already, but the calculation would use the ExecuteSQL function.
Unfortunately, it's beyond my capability to instruct on the details as I'm still learning about this very versatile function myself.
It'll be something along the lines of:ExecuteSQL ("SELECT MIN ( \"Sale Date\" )FROM \"Invoice\" aWHERE a.\"_kf_CustomerID\" = ?" ; "" ; "¶" ;// This bit below replaces the question mark above_kf_CustomerID)So it will return the earliest Sale Date from the table Invoice for that Customer regardless of how the found set is sorted or filtered.
You can also set up such a calculation, if you define it in the customer table rather than the invoices table. From the context of the customer table, the minimum date (via either a summary field in invoices or a Min function in this calculation field), will be the minimum date of all the invoice records linked to a specific customer. A calculation field in Invoices can then compare this value to the invoice date to flag the invoice of the first invoice of a new customer.
No worries, will try and see how it goes.