2 Replies Latest reply: May 2, 2010 6:12 PM by Fernando Toledo RSS

    Rank Within a Dimension

      I created buckets to get the sales of the top X number of clients in a chart using the following expression.


      if (BuckettA = 'Top10', sum({$<Year={2009},Customer = {"=rank(sum({$<Year={2009}>}Sales)) <= 10"}>} Sales)/sum({<Year={2009}>}Sales),

      if(BucketB = 'Top20', sum({$<Year={2009},Customer = {"=rank(sum({$<Year={2009}>} Sales)) <= 20"}>} Sales)/sum({<Year={2009}>}Sales),

      if(BucketC = 'Top30', sum({$<Year={2009},Customer = {"=rank(sum({$<Year={2009}>} Sales)) <= 30"}>} Sales)/sum({<Year={2009}>}Sales),


      I layered a dimension of Salesgroups onto the expression above.

      The result I'm getting is that all the SalesGroups are pulling the TOP 10/20/30 RANK FOR ALL OF 2009 across ALL SALESGROUPS instead
      of the top 10/20/30 RANK WITHIN THE SALESGROUP.

      Can someone point out to me how I can adjust/change my expression above to make the ranks within each bucket apply WITHIN THE DIMENSION SalesGroup?

      Thank you in advance...