AnsweredAssumed Answered

Anual Balance by month

Question asked by JorgeFernandez on Oct 14, 2012
Latest reply on Oct 18, 2012 by JorgeFernandez

Title

Anual Balance by month

Post

     Hi everyone!

     I´m working on a DB for invoices and expenses.

     What I´m trying to create is a balance layout where you can see total income and total outcome by month in one year, looking like this:

     Year: 2011

     Jan: income: $2478

             outcome: $1890

     Feb: income: $2796

              outcome: $1867

     ... Dec: ...

     The way I´m thinking is: I have 2 tables (invoices and expenses)

     Decided to create a new table (balance)

     If I create 2 new fields on each table: year and month (using Year (Date) and Month (Date) )

     And creating some relationships to fields on balance table:

     invoices::year = balance::year

     and invoices::month = balance::January

     then another relationship

      

     invoices::year = balance::year

     and invoices::month = balance::February

     and keep doing it till December

     And finally a relation to:

     invoices::total X balance::Total

     And creating a simple script using sum (invoices::total).... 

     Then I can make it, but i think there is another way.

      

     Can you please help me??

Outcomes