2 Replies Latest reply: Jul 25, 2011 8:21 AM by mrkachhia RSS

    Conditional Total

      I have below table showing Invoice data against Customer ID.

       

      Customer IDInvoice NoInvoice ValuePAID?
      ABC11125NO
      PQR12130NO
      DEF13140YES
      GHI14155YES
      JKL15146YES
      ABC16128YES
      XYZ1799NO
      MNO18100NO
      PQR19135NO
      XYZ20198NO
      PQR21197YES
      ABC22210YES
      DEF23150NO
      GHI2495NO
      JKL2550NO

       

      I want to get total value of unpaid invoices against each Customer ID.

      Can someone please give me script?

      The result should be as below

       

      Customer IDInvoice Value Not Paid
      ABC125
      DEF150
      GHI95
      JKL50
      MNO100
      PQR265
      XYZ297
      TOTAL1082


      Thaks in advance.