### Title

formula needed for debit and credit calculation

### Post

I have a invoice that uses a portal to display line items. At times some line items could be a credit while other line items could be debit. I wanted to have a selectable drop down list for 'd' or 'c' but am stumped on a formula. I was thinking a case function or if but need help. I need to subtotal all the credits and subtotal all the debits with the formula.

Your help will be greatly appreaciated.

Thanks

Add two calculation fields:

If ( DropDownfield = "c" ; Qty * Price )

If ( DropDownField = "d" ; Qty * price )

You can now take the sum of these two fields to compute debit and credit subtotals.