2 Replies Latest reply: Dec 16, 2010 10:02 AM by Anders Schaeder RSS

    Counting order rows

      Hi.

      I need to know how many orderlines is in one order.

      I have a table with orderlines. and need to know on each line how many lines there is in total in that order. regardless if just one orderline is selected.

      My table has theese fields:

      ordernumber, orderline number, totalorderfreight, linesum, quantity, etc.

       

      I tried to aggregate over ordernumber and count ordernumber, but that does not work.

      ( aggr(count(orderline), ordernr) )

       

      any ideas?