4 Replies Latest reply on Jul 8, 2013 7:46 PM by Craig Dewar

    Sorting not sorting as expected

    Craig Dewar

      Got a challenging one for all of you tableau guns out there.

       

      I'm running a competition with daily scores based upon certain business rules.  There is a mix of personal scores, and team scores, which aggregate to a team score per day.  I have a dashboard which is set up to show a team ranking - sorted by overall team score descending - and it isn't.

       

      Hoping someone can help.

       

      refer to the attached word doc and twbx file for details.

        • 1. Re: Sorting not sorting as expected
          Robin Kennedy

          Take Date out of the level of detail and the sort works fine.

          1 of 1 people found this helpful
          • 2. Re: Sorting not sorting as expected
            Craig Dewar

            Thanks for the tip - but date is required at level of detail to make the daily scores accurate.

             

            Team scores are adjusted depending upon how many team members completed the challenge in any one day.

             

                 IF SUM([Raw Score - Change Scenery]) >= 2 THEN [Team Challenge Scores for 2 or more]

                      ELSEIF SUM([Raw Score - Change Scenery]) >= 1 THEN [Team Challenge Scores for 1 only]

                      ELSE 0

                 END

             

            If you aggregate across all days then the team scores reduce to a maximum of 5 - which is the value of the [Team Challenge Scores for 2 or more] parameter.

             

            Is there some sort of Window_sum i can use in the situation to sort by a table calc?

            • 3. Re: Sorting not sorting as expected
              corey.barrett


              Did you ever get a solution to this?  I am finding that the Tableau sorting is not as intuitive as I'd like.  We'd like user's to add / remove multiple metrics on the fly and sort as needed.  Every time I try to sort based on metric values and there is more than one dimension and more than one metric the sorting results dont look sorted.  I've looked at the Tableau cbt for  sorting and I tried a couple of things, but no luck.

               

              Anyways, I was wondering what kind of workable solution that you came up with.

              • 4. Re: Sorting not sorting as expected
                Craig Dewar

                Alas, no solution for problem above.  Had to live with a manual sort and republish every day during the competition.

                 

                I did however come across something recently that has helped with a different sorting challenge.

                 

                This article from freakalytics shows how to sort dimensions within dimensions to sort independently within levels.

                 

                Tableau Tips:
                Nested sorting not as expected-a simple fix