### Title

SUM exactly same value as the field

### Post

Hi forum!! Am trying to get the total sum of my 'Amount' column, instead of adding all the values from every row it seems FileMaker is only mirroring the 'Amount' value of each row. The formula am using is Sum(Expenses::Amount). I got it working when I used a summary field but it wouldn't let me relate it to other databases.

Sum adds up the list of values located inside the parenthesis. Sum ( Expenses::amount ) only gets one value to sum up and thus produces the same result as if you just used Amount in its place.

A summary field, as you've found will add up all the values in yoru found count and can even compute a running total if that should be useful.

In order for Sum ( ) to work for you, it'd need to refer to all the records being summed. That requires a relationship to another table or table occurrence. You can use that to relate a table to itself so that you can compute the sum, but the resulting total is an unstored calculation and this also cannot be used in many relationships. (Unstored fields can only be used on the Parent side of a relationship.)

Say you want sum to compute the sum of all the records in your table.

Define this relationship:

Expenses::anyfield X Expenses2::Anyfield

Create Expenses2 by selecting expenses, then clicking the button with two green plus signs. Now Sum ( Expenses2::Amount ) will compute the total for all records in your table. If you only want sum to compute a total for a smaller subset of the total records, you'll need to modify the relationship to link only to those records.