There is a function that you can use in your calculated field called... rank - https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_tablecalculations_definebasic_runningtotal.html#Rank
There are a few options for rank that you can use, like RANK_UNIQUE, which assigns the same ranking value for the categorical variables that have the same label name. For example, if you had rows where 2 categories were the same, like "Office Supplies" appeared twice, then with RANK_UNIQUE if you were ranking on the sales function, then you'd get a 2 or 3 (or whatever the rank is) appear for both rows
In your context you can likely get away with the standard RANK function:
RANK(AVG([Sales]))
Let me know if you need anymore assistance