Display rows until aggregate value reached

I have a timesheet table where contractors enter their time and submit invoices to be paid. I have an invoice table where these payments are made to a contractor.

A contractor table has a VC that calculates the owed value from their submitted timesheets, this value is negative (for over-paid) or positive (yet to be cashed out).
I have an action for contractors that lists the timesheets before the last payment date.
(linktofilteredview(“Timesheet”,and([Contractor]=[_THISROW].[Contractor],[Date]>[_THISROW].[PaymentDate])))
I want to change this action to list the rows from timesheet that sum to the owed value.
How do I create an expression that aggregates a value for comparison:
linktofilteredview(“Timesheet”,and([Contractor]=[_THISROW].[Contractor],SumOfRows([Invoice])<[Paid]))
Where SumOfRows() adds the column of the matching row to the previous matched rows.
How would the match be sorted or reversed (ascend, descend).

I can’t think of a way to do this that isn’t absurdly complicated. I wonder if there might be a better way to accomplish your goal. Why do you want to display rows until aggregate value reached?