0 Replies Latest reply: Apr 17, 2012 1:10 PM by migle purzelyte RSS

    Debt changing over time

      Hi,

       

       

      I have two tables: Invoices and Payments. The first one contains Invoice_nr, Invoice_date, Due_date, Invoice_sum and the other has Invoice_nr, Payment_date, Payment_sum. I can count the open sum for any specific date var_date with a desired delay var_late:

       

       

      SUM(

                     {$<

                                    [Invoice date]={"<=$(=var_date)"},

                  [Due date]={">=$(=date(var_date-$(=var_late)))"}

                     >}

      [Invoice sum])

      -

      Sum(

                     {$<

                                    Invoice date]={"<=$(=var_date)"},

                                    [Due date]={">=$(=date(var_date-$(=var_late)))"},

                                    [Payment date]={"<=$(=var_date)"}

                     >}

      [Payment sum])

       

       

      What I need is to know how the debt changes over time. The previous table can give me the answer that for 12/01/31 I had the debt of 50 EUR which was late for less than 7 days but if i want to know the same number for 12/02/29 i need to enter 12/02/29 in the var_date. I want to have the table which shows me the debt for the end of every period.

      Any ideas?

       

       

      Thanks in advance.