1 Reply Latest reply on Sep 30, 2014 2:01 PM by mikebeargie

    Making an income statement

    jorge15

      Hi,

       

      I am trying to add totals for each expense and subtract from income to include it on my income statement:

       

      I have three fields - Expese/Income Type

      - Debit Amount

      -Credit Amount

       

      Under (Expense type) I have a drop down list which includes "Payroll", "Materials", "Sales Income"

       

      My income statement is Sales Income

      -

      Materials

      -

      Payroll

      =

      Revenue

      How or what I have to do in order to get totals from each expense type to be able to add them or subtract

        • 1. Re: Making an income statement
          mikebeargie

          You could calculate a field like this:

           

          Case(

             Expense::Type = "Sales Income" ; Expense::Credit Amount ;

            Expense::Type = "Payroll" ; Expense::Debit Amount * -1 ;

            Expense::Type = "Materials" ; Expense::Debit Amount * -1;

            Expense::Amount

          )

           

          Then you can just summarize that field to give you your revenue total.

           

          Additionally, it would be quite easy to use ExecuteSQL() to give you totals for each type.

           

          such as: ExecuteSQL("SELECT SUM(Credit Amount) FROM Expense WHERE Type = ?" ; "" ; "" ; "Sales Income" )