FM 17 not adding correctly ... or I am insane

I have used Filemaker since the 1980's. I am building a data base that will have pretty close to 100,000 records when done, That's NOT the problem, the problem is that I've numeric fields 1 to 25 that are not being nice and adding for a total. I have tried this with
=sum(feild1 + feild2 ....+ feild25) ;
feild1 + feild2 ....+ feild25; and also
=sum(feild1, feild2, ... feild25)

Non-of-this is working. I have verified that all the fields are numeric. I cannot imagine that this simple math equation is stopping me in my tracks.

Peter Kelley
St. Paul, MN USA

What happens if you export just those fields to a new FileMaker file, for just one record, and you add your calculation in there? Could you upload that file here?

1 Like

I will see if I can up load a sample file and record. Right now I am fighting ... like ... three irregularities with the project. Started with what seemed to be the easiest of them. Will be back later with the file.

Peter Kelley
St. Paul, MN USA

screen shots would help too
BTW:
sum ( f1 + f2 + ... +f25 ) is not a valid expression and should prompt: "A function parameter contains an expression where a field is required."

2 Likes

Hi @MstrPBK,

Your SUM function should be using semicolons as a separator between the fields.

Using plus symbols is the manual way of adding field data, no need for the SUM function if you do that.

2 Likes

Welcome to the soup!

Malcom has it.

You would either do this:

MySummationField = Sum(TableA::Field1 ; TableA::Field2; TableA::Field3)

or

MySummationField = TableA::Field1 + TableA::Field2 + TableA::Field3

Also, whenever you see a database design that has 25 fields in a single table (Field1, Field 2... Field25). you are almost surely using a poor design. You probably should have these 25 fields in a related table

See Database normalization - Wikipedia

When you normalize the database, then your Sum() formula becomes trivial:

MySummationField = Sum(ItemsTable::Price)

4 Likes

Basic question that needs to be asked - Are all of the fields you wish to add formatted as NUMBER fields? If they are formatted as text, use the GetAsNumber() function to convert the content of the fields to numeric format.

https://help.claris.com/en/pro-help/content/getasnumber.html

4 Likes

Welcome to Thesoup @pacerprint !

3 Likes

Thank you very much.

8 posts were split to a new topic: Normalisation

Another thought - In the Specify Calculation... dialog, make sure the "do not evaluate if all referenced fields are empty" is checked OFF.