7 Replies Latest reply: Dec 20, 2012 9:19 AM by Giorgia Michieli RSS

    Aggr function

    Giorgia Michieli

      Hi all,

      I have this situation:




      For the same article I have 1 document associated with the customer and for the same document associated with the customer I have 2 or more warehouse documents.

      Therefore I have many rows associated with the same customer. And this is correct.

      My problem is in the total. As you see in the picture, the field "Ordinato" is a quantity. Sum(Ordinato) is wrong because in this way I have total in all rows.

      Sum(distinct Ordinato) returns the values I expect but is not logically correct.

      sum(aggr(sum(Ordinato),fornitore,numdoc,linea,cod.articolo,cod.colore,dt doc stireria,nr doc stireria)) doesn't work.


      sum(aggr((Ordinato),fornitore,numdoc,linea,cod.articolo,cod.colore,dt doc stireria,nr doc stireria)) has column fields correct but it calculates wrong total.


      I would like to have 860.00 as total and






      in columns


      How can I do this?


      Thank you!