Ranks answer "where does this one stand?". Tableau ranks marks with table calculations, so the rank follows the view.
The quick way: put a measure on Label, right-click it and choose Quick Table Calculation > Rank. In a calculated field, RANK(SUM([Sales])) does the same; the biggest value gets 1.
Ties are the classic trap. RANK gives tied marks the same rank and skips the next ones (1, 1, 3). RANK_DENSE doesn't skip (1, 1, 2). RANK_UNIQUE breaks ties so every mark gets its own number.
Like every table calculation, a rank has a direction. With the dimension on Rows, set Compute Using > Table (down), or every row ranks 1. To rank inside groups, compute along the inner dimension only, for example Compute Using > Sub-Category, so the ranks restart in each category.