1 Reply Latest reply on Sep 20, 2011 7:57 AM by philmodjunk

    total orders written

    jungovox

      Title

      total orders written

      Post

      I don't know why I can't get this - (table view)

      I am working with a line file for orders

      and simply want to know how many orders a saleman has written (without exporting the summaries)

      in this case 3

       

      order number

      1234

      1234

      1234

      1111

      1111

      1245

        • 1. Re: total orders written
          philmodjunk

          And how do you know that these order numbers are written by a given salesperson?

          Presumably you have a field in the Order table that identifies the salesperson?

          I'll assume such a field and that it is named Orders::SalesPersonID.

          The sum the reciprocal method can be used here to count the number of unique Order Number values and this should produce the correct order count, either for one salesperson or more than one if your sort your line item records to group them by salesperson.

          First define a summary field in your line items table that counts a field that is never blank such as your order number field. We'll call it sCount.

          Define a field of type calculation, cFraction, that uses this calculation:

          1 / GetSummary ( sCount ; Orders::SalesPersonID ) // use your field and table names in place of mine

          Define set another summary field, sOrderCount, as the Sum of cFraction

          Sort your records by Orders::SalesPersonID, put sOrderCount in a sub summary layout part "when sorted by Orders::SalesPersonID", and this summary field will then report the number of orders by each salesperson, provided that you have all the relevant line item records in your found count and sorted by the Orders::SalesPersonID field.