3 Replies Latest reply on Dec 10, 2012 12:47 PM by Joe Mako

    Ranking on a Table Calc

    Michael Mixon

      Hi,

       

      This is probably something right up Joe Mako's alley. :-)

       

      I'm trying to set up a Top 10 chart, with the ranking based off of a table calculation.  I can sort the list in descending order (using another trick Joe showed me once, where I just take the negative of the table calc in question and place it as a discrete and hidden pill on the Rows shelf), but I can't get the index() function to assign the correct number to the list of values.  And without an accurate index, I don't think I'm able to create a Top 10.

       

      I've put together a sample workbook that shows the dilemma.

       

      -Mike

        • 1. Re: Ranking on a Table Calc
          Joe Mako

          The computation you are asking for does not need to be a table calculation. see attached.

           

          Tableau does not directly have the ability to sort the addressing of a table calc based on the result of another table calc, but in every situation I have seen, there is an alternate route to produce the desired results, sometimes it take a bit more effort, or sometimes like your example here, you have made it more complex than it really is, and there is an easier route.

          • 2. Re: Ranking on a Table Calc
            Michael Mixon

            Hi Joe,

             

            Yeah, the sample I provided can be solved this way.  I'm not sure my actual situation can be resolved in this manner, as I need to use the table calc.  What's the best email to send you my actual file for you to look at?

             

            -Mike

            • 3. Re: Ranking on a Table Calc
              Joe Mako

              Yes, every situation can be a unique, with different constraints, requirements or data contents all can affect potential routes.

               

              Effectively using Tableau table calculations requires an understanding of how Tableau deals with data, what goes on behind the scene, between dropping a pill on a shelf and the visual that Tableau produces, the logic Tableau uses under different conditions, and so much more enables you to create any result you want in Tableau.