How would I write a formula that would only select the last financial transaction a client made.

I have access to a number of unique identifiers I was looking at using.

I would think the best way to do this would be to identify all transactions made by the ClientID (these will not be sequential) and then based off that, select the highest transaction key to apply my formula to.

I cannot make this happen, could someone more experienced help me out?