0 Replies Latest reply on Aug 28, 2012 8:58 AM by sarahbilawski

    group by sum

        Is there a method to group by the sum of an item then count
      the number of occurrences of that sum?

       

      Example.

       

      There are multiple teams selling a product, say
      cookies.  Each sale can have 1 or more
      cookies sold.  Each sale notes a date and
      a sales team.  I need to be able to sum
      the sales by team given a time frame and count the number of teams selling the
      same number of cookies.

       

      Like this: 

      May 2012 Cookie Sales

        # Cookies Sold    #Teams Selling that number of cookies

      1                                                1             

      2                                                4

      4                                                20

      12                                             2

      102                                           16

       

       

      So I need to sum the sales by group for the time frame, then
      count the number of groups which have that sum of cookies sold.

       

      I don’t want to use bins, or defined groups, as the total
      number of cookies sold could vary month by month or year by year depending on how
      I slice up the data.