Tableau has a function RANK_UNIQUE which you can use for this query
As a first step, uncheck the aggregate measures within the Analysis Menu.
Then, starting from this sample data:
You can get the following result:
Additionally, if you want to hide Rank from rows -- not-showing header.
Is this something close to what you're looking for?
In order to get all values and not just for the top rows, just move the Rank at the very beginning of the shelf: