4 Replies Latest reply on Jul 23, 2012 3:59 PM by olga.yukelson

    Why sorting on second dimension is not working?

      I'm trying to sort on column 'Total QTY per SKU' and its not working. Any idea?

       

       

       

       

        • 1. Re: Why sorting on second dimension is not working?
          Jonathan Drummey

          Tableau does sorting hierarchically, so in your view SKU is sorted alphabetically. There are various ways to make sorting work as desired in Tableau, however in the example you posted there's only one way to get the sort right because Total QTY per SKU is a table calc:

           

          Create a calculated field based that has the formula: -[Total QTY per SKU]. Drag that field onto the Rows Shelf, make it Discrete, and then make it the left-most field, then uncheck Show Header.

           

          Cheers,

           

          Jonathan

          1 of 1 people found this helpful
          • 2. Re: Why sorting on second dimension is not working?

            Jonathan - thank you for replying!  I'm following what you recommend but in I'm loosing ability to sort by SKU then.

            I'm afraid I didnt explain my problem clear - I need to have ability to sort separately by first and second dimension column, but seems sorting works for only first column. Could you please help out?

             

            Thanks,

            Olga

            • 3. Re: Why sorting on second dimension is not working?
              James Baker

              Hi Olga,

               

              Jonathan is correct that Tableau does sorting hierarchically - in other words, sorting the second column sorts within the first column's values, and does not "break the hierarchy".

               

              I think you could still get close to what you want by continuing down the current workaround path:  Enhance your "sorting calc" to return one value or another value dependent on a Parameter value, which would then let your users pick their sort from a Parameter dropdown widget.

              1 of 1 people found this helpful
              • 4. Re: Why sorting on second dimension is not working?

                Thank you James - I'll do this way.

                I'll put parameter what they want to sort and according parameter create 'hidden' calculated field. Not like my customers would like it because Excel can do it without any parameters :-)