2008 alternative to LAG?

Brilliant, many thanks :grinning:

I had to add

AND c.TransactionDate >= CONVERT (CHAR (8), DATEADD (DD, -7, GETDATE()), 112)
AND c.TransactionDate < CONVERT (CHAR (8), GETDATE(), 112)

inside the outer apply piece of code (??) but it works beautifully.

Take a bow Sir! I'd never even heard of OUTER APPLY before your post!!