12 Replies Latest reply on Jun 26, 2012 5:44 PM by Michael Mixon

    Sorting based on table calculation

    Michael Mixon

      Hi,

       

      I've done some searching already for this, and it appears it may not be possible, but I'd like to give the big minds on this forum a chance.  Here's what I want to do:

       

      • I have a forecast accuracy metric that I calculate for each week of the quarter.
      • I need to display a quarterly average of all of those weekly numbers.
      • I need to sort the resulting chart by the quarterly average and assign ranks to the customers based on this quarterly average

       

      Creating the quarterly average is simple (window_avg([Forecast Accuracy])), and displaying the quarterly averages by customer is also easy (I just place week on the level of detail shelf and turn off stack marks so that the label shows a single value for each customer.

       

      The difficult part is getting the resulting chart to sort in descending order of this quarterly average.  Whenever I try to do it (using the quick sort), I get inconsistent and often incorrect results.  Furthermore, I need to have the list re-sort dynamically when a user selects a different product segment.

       

      Is this possible?  Please make my week by saying 'Yes'.

       

      -Mike