2 Replies Latest reply on Jul 4, 2012 7:37 AM by Ian Waring

    Simple League Table

    Ian Waring



      I have the most basic list of customer sales by month:


               Jan  Feb  Mar Apr May Jun YTD

      Fred    2      4      8    2     1     3    20

      Joe     1       4      1   3      7     2    18





      etc. All I want to do is to sort the table by total sales (easy), but to put a ranking number in the table of just the view i'm seeing in front of me, but I also want the grand totals at the end of each row and at the bottom of all the columns too. That appears to be non-trival to do :-(


      Any ideas how to do this without Tableau getting it's knickers in a twist about being unable to sum a discrete measure?

        • 1. Re: Simple League Table
          Aaron Clancy


          In order to get a rank you would sort your totals by YTD desc.  Create a calculated field with only index() in its formula.

          Place this field at the beginning of the rows shelf.



          Rank will still show a value for totals although it doesn't make sense to have a value.

          This only works for the vertical values so YTD will need to exist in your data or through a calculated field that adds up all of the month values.


          Hope this helps.



          1 of 1 people found this helpful
          • 2. Re: Simple League Table
            Ian Waring

            Thanks Aaron,


            The complication I have is that the data is coming out of a cube, and I've found it nigh on impossible to get a rank in the display with row totals showing and using index() at the same time (which I then wanted to filter down so only the top 20 or 40 displayed).


            The ideal presentation is to (1) have the league table rank as the first column displayed, (2) not have it populated in the totals line and (3) allow me to show the top 20 as is, to put a fold on "all others" for the remainder summed together, and then the total at the end. But that feels like a major hack...


            In the meantime, just the league rank anyway would help :-)


            Ian W.