Show last "x" number of sales variable help!

Morning team!
I’ve tried searching the forum and search engines, but can’t quite seem to find a solution.

I have a table that looks a little like the below:

The sale ID is never sequential and can be completely random like shown.
I want to be able to show the last orders by date and time, but be able to change the number dependent on a filter (a bit like relative date).
Any idea how I can achieve this?

Thank you!!

For anyone that has looked, please ignore this post.
I was clearly being very silly this morning prior to my coffee.

Solution:
Create a variable that is simply: =Rank([Sale Date])
Then filter for the top x that I’m after.