1 Reply Latest reply on Dec 14, 2012 8:21 AM by Mark Holtz

    Sort on Calculated Field

    Michael Lance

      Hello.

       

      I have the following survey response categories:

      Don't Know

      Not Needed

      Low Need

      Medium Need

      High Need

       

      From data based on these, I've created the following chart (each row (bar) represents answers to a question, Medium or High Need only):

       

      Bars.jpg

      I am attempting to sort (rank) the bars descendingly by their overall length (or "medium need" + "high need").

       

      To do this, I've created the calculated field below:

       

      Medium or High:

       

      if([Response])="Medium Need"

      or  [Response]="High Need"

      then 1

      else 0

      end

       

      But when I attempt to sort by these, descendingly, I get the result above (close, but no cigar).

      Notes:

      1. I'm sorting by the SUM of this field, which seems to be the best measure.

      2. The column shelf contains a distinct count, since there are multiple rows per respondent in my data set.

       

      Thanks!

        • 1. Re: Sort on Calculated Field
          Mark Holtz

          Hi Michael

           

          Presumably, you have some dimension in your Rows shelf creating the multiple bars.  You would want to add your SUM(calc field) to the Level of Detail shelf. Then, you should be able to choose that dimension's sort and set it by your calculated field (descending).

          If that doesn't work, could you post a packaged workbook?