3 Replies Latest reply on Apr 27, 2012 2:20 AM by vlad.turbuleasa

    Top 10 Calculation Year over Year

    Elizabeth Coleman



      Is it possible to calculate the top 10 or bottom 10 that shows year over year?  For instance I want to know who  forecasted accurately this year, last year and the year before.  How do I calculate that in Tableau?  Thanks

        • 1. Re: Top 10 Calculation Year over Year
          James Wright

          Hi Elizabeth,


          Here's a quick answer for you that should point you in the right direction. This is using the default Superstore Sales data and a calculated field I called "Rank".



          Index is going to simply give us the position in the list of things on the viz.


          To start, I added year and customer to my viz and displayed sales as a bar. After dragging rank on as a filter, I right clicked on it to access the Edit Table Calculation option. I used the "advanced" option under "compute using", moved both fields (Year and Customer) to the right side of the dialog and sorted by descending Sales.


          Advanced filter.png


          Then I OK'd that and came back to my table calculation dialog, asking it to rank by customer and restart every year.

          top10customersbyannual sales.png


          At that point, it's just a matter of filtering to get only the top X (in this case 10). To get the rank into the view, I cntrl+dragged it into labels and also created a discrete version to sort my customers by (right click, convert to 'discrete', drag between customer and year, then uncheck "Show Header" for that pill.


          Hope that helps - I've linked to a Tableau Public visualization demonstrating the product below.



          • 2. Re: Top 10 Calculation Year over Year
            Elizabeth Coleman

            thank you.  That solved the problem. 

            • 3. Re: Top 10 Calculation Year over Year

              Hello everyone ,


              How can i make a top 10 devices table that are sending data to my oracle DB if i have 800 devices and a point is that will dynamical change the divaces if in the DB the traffic log change. I must show in my table the top 10 devices and all other devices to be grouped to "Others" ? Has someone some idea?