### Title

How do I calculate this? Can't seem to get it to work

### Post

I need to calculate how much $$ is being spent in each of 3 categories every month to be able to track whether or not we are in budget. I keep records of transactions in a table called Monthly Accounting. One table. Each record has an ID, creation date, category for payment - I have Employee Salaries (A), Student Payments through Bursar's Office (B) , and Student Payments through Outreach Program (C) - and amount (I enter these as negative numbers since they are subtractions from the initial amount for each month.

So I want to know each month the total of A, the total of B and the total of C. I will need to sum each of these later into a report by fiscal year.

I am able to get totals for ALL subtractions.

I am able to select out the records and get sub-summaries using portals.

I can't see what I am doing wrong. When I try to calculate with either "case" or "if" I get the total amount as if I have not selected records though case or if. For example: If ( Category = "Student Support | Bursar" ; Sum ( Amount) )

What am I doing wrong?

If ( Category = "Student Support | Bursar" ; Sum ( Amount) )

Makes no sense. Since there are no tables names, Category, Amount and this calculation would seem to be defined in the same table (Monthly Accounting?) and thus the calculation would return nothing or the value of that record's Amount field. (You might want to look up Sum in FileMaker help to note what syntax should be used to get a sum.

Selectively summing values can be done through several different approaches:

If you have FileMaker 12 or 13, you can use the ExecuteSQL function: FMP 12 Tip: Summary Recaps (Portal Subtotals)

If you don't have one of those versions or you don't wish to use SQL, there are other options: Sum_Calculation based on condition