5 Replies Latest reply on Sep 16, 2016 7:10 AM by Andrew Watson

    Top N and Ranking by Years

    May Shaw

      Hello

       

      I'm kind of new to Tableau and trying figure out how this works. I'm trying find out the Top 5 of Sales by years. If I create the a set using Top 5, the result will show correctly when I don't filter the years, as below.

      Capture1.JPG

       

      However, if I try to find out the result by years, the Top N set will not work because it is only showing the Top 5 from total but not by year.

       

      Is there any way to do this correctly? I tried to use the Rank function to do this, but I was not able to get the correct sum of Top 5 by years using Rank function.

       

      I've attached the work file (I used the superstore data as an example).

       

      Any insight would be much appreciate! Thank you!