6 Replies Latest reply: Jul 20, 2016 6:22 AM by Stefan Wühl RSS

    how to join many payments related to the same bill

    Ignacio Garribia

      Hello! I need you help with this problem. I need a field in Sales Table which indicates the sum of payment amount related to the bill.

      The field ID identify the bill, while there could be many PaymentID related to the same ID

      I tryed left join  but it doesn't work because there are many PaymentID related to the same ID

      Thank you very much for your help!!

      I attached the qvf and example file

       

      I have the following script:

       

      Sales:

      LOAD

          ID,

          "Date",

          DueDate,

          Amount

      FROM [lib://Documents/Joining payments to bills.xlsx]

      (ooxml, embedded labels, table is Sales);

       

       

      left join (Sales)

       

      Payments:

       

      LOAD

          PaymentID,

          ID,

          "Date",

          PaymentAmount

      FROM [lib://Documents/Joining payments to bills.xlsx]

      (ooxml, embedded labels, table is Payments);