### Title

Need help with calculation

### Post

At least I think it would be a calculation.

I have a file setup to track my sales. I have a layout that is just a running order of the transactions and I sort them into paid and unpaid. I'd like to have two boxes at the bottom that gives me the total for each, but I'm not sure how to set it up.

I assume I'd set up two fields, a paid and an unpaid. From there I'm stuck.

There are multiple ways to do this.

The simplest to explain is to add 4 fields (plus the status field that shows paid or unpaid) to your table.

Define a field, cPaidAmount, of type calculation:

If ( status = "Paid" ; Amount )

This field will be empty if status is unpaid.

Define cUnpaidAmount as:

If ( Status = "UnPaid" ; Amount )

Then define to summary fields, sTotalPaid and sTotalUnpaid to compute your two totals.

Define sTotalPaid as a summary field that computes the total of cPaidAmount. Define sTotalUnpaid to compute the total of cUnpaidAmount.

These summary fields will compute totals over all records in your found set. Perform a find for just a certain group of records, such as all records for the Month of April, 2013 and these fields will compute just the totals for that month.