1 Reply Latest reply: Mar 1, 2017 6:16 PM by Simon Brulotte RSS

    AGGR() on Only ()

    Simon Brulotte


      I have this set analysis


      =aggr((only({< Année = {'2016','2017'}, [Statut de la commande] -={'4'}>}[Quantité requise]) - only({< Année = {'2016','2017'}, [Statut de la commande] -={'4'}>}[Quantité reçue])) *

      only({< Année = {'2016','2017'}, [Statut de la commande] -={'4'}>}[Prix unitaire réception]), Nom, [Description du bon de commande], ld)




      For a Supplier (Nom), that has an order (Description du bon de commande), there are items (ld).

      For each item I want to substract what I have received to what I ordered, and multiply that by unit price.


      I thought AGGR would return the sum for the supplyer. But that only works if there are item per order...


      What should I be doing?


      I don't want to rework the model right now.