4 Replies Latest reply: Jan 13, 2018 5:27 AM by Shivesh Singh RSS

    Sum of partial sums

    Jorgen Santbergen

      Hi,

       

      I want to get the negative margin of the credit note like in the table below.

       

      OrdnoArtnoSalesMargin
      1234111110050
      12341111-100-75
      1234222220080
      12342222-200-90
      567811115030
      5678222210040
      56783333800100

       

      The outcome I want is the sum of the margin on orders where the sum of sales = 0 (so in this example Ordno 1234). The outcome in this case should be -35, but when I use Sum({<Sales={0}>} Margin) I get no result.

       

      Can somebody help me?