1 Reply Latest reply on Oct 26, 2018 8:03 PM by swaroop.gantela

    Sort Ignores One Row

    Michelle Hum

      Sorry I can't upload the workbook, but i'll include as much detail as possible.

       

      I have a question where people rate their awareness of a bunch of items from 'unaware' to 'one of my favorites'. I am also calculating an average response value for each item. I want people to be able to sort based on their awareness, but then also the average score. When I try and sort the items by the average response value (grey bars), I get this:

      Screen Shot 2018-10-26 at 2.48.47 PM.png

      When I try and do it based on the buttons in the header everything works as expected for most values, except there's always one value at the end that is in the wrong spot.

      Screen Shot 2018-10-26 at 2.48.57 PM.png

      Here's the formula I used for the average response

      {include [Item]: (avg([Value]}

       

      Is this a known bug? Any ideas why it's ignoring one of my items?

        • 1. Re: Sort Ignores One Row
          swaroop.gantela

          Michelle,

           

          I'm not sure if this will work for your setup, but maybe it can give ideas.

          You can try creating a calculated field with the sort value,

          then putting it on the leftmost position on the Row shelf,

          and then I hide it by unchecking "Show Header".

           

          I (poorly) mocked up a survey facsimile using Superstore

          and created a sort value using a Sort by parameter and:

          CASE [Sort by]

          WHEN "Average" THEN -[AvgCalc]

          ELSE

          - { FIXED [Sub-Category]:SUM(IF [Sort by]=[ResponseBridge] THEN 1 ELSE 0 END)}

          /

          {FIXED [Sub-Category]:SUM([Number of Records])}

          END

           

          // note the negative sign is used to sort descending

           

          Please see the workbook v10.3 attached in the Forum Thread:

          https://community.tableau.com/thread/286035

           

           

          You have likely already seen this, but just in case, here is Steve Wexler's

          excellent post on Survey Data:

          How to Visualize Sentiment and Inclination | Tableau Software

           

           

          286035sort.png