6 Replies Latest reply on Sep 22, 2015 10:37 AM by Rebecca Bauer

# HELP! Ranking Order in Tableau Table

Is there a simple way to get numbered order rank in a tableau table? I figured out how to add a calculated filed for order rank (first column), but now I would like that field to stay 1, 2, 3 regardless of the sort applied to other columns such as total enrollment so that I can see the ranking order by sort. Any advice would be great! Thanks!

• ###### 1. Re: HELP! Ranking Order in Tableau Table

Hello Rebecca,

I put together something a few days ago that deals with a similar issue.

Maintaining Rank and Sort with a Lower Level Dimension

Let me know if this wasn't what you needed.

Regards,

Rody

• ###### 2. Re: HELP! Ranking Order in Tableau Table

So are you saying you'd like it to always say 1,2,3 regardless of the sort?

It looks like you may want to use "index()" instead of "rank()".

See attached.

• ###### 3. Re: HELP! Ranking Order in Tableau Table

Yes I believe you are correct that Index is the formula to use as it is working great on your example. For some reason on my workbook when I sort by any of the measures it changes the index number. How do you keep that consistent as 1, 2, 3 regardless of the sort applied? Thanks so much for your help!!

• ###### 4. Re: HELP! Ranking Order in Tableau Table

If you're doing compute using Table Down for the index() then it should number Asc based on whatever your sort is.

• ###### 5. Re: HELP! Ranking Order in Tableau Table

I just have the index field going "down".  I can't see any other reason why it wouldn't work.

1 of 1 people found this helpful
• ###### 6. Re: HELP! Ranking Order in Tableau Table

Thank you! Yes! It seems to be working now. YAY!! So appreciate all your help and quick responses Rody Zakovich,Kris EricksonDaniel Vincent!