What do you mean by the 'sum of a field'?
Sum as in adding all the number field together.
But what fields are you adding? Not that it matters, really - but there's clearly more to this than simply "how do I divide a number by 2?". Whatever you were going to tell me was how you sum the numbers, I was expecting to suggest you just divide it by two. The sum function works two ways. If you have some number fields in the record it can add them together:
Sum ( Field1 ; Field2 ; Field3 )
If you want to add the values in a number field in every related record, you can use:
Sum ( Relationship::NumberField )
In both those examples just dividing that by 2 will give you the answer.
But can i know what is the divide sign?
( (Sum ( Twin )) / 2 )
The above is my calculation, but it doesn't seem to work. The Field is Twin, which is a number field already.
I want to divide it by 2, but it came up as 0 instead.
If the field Twin is a number field already, why are you trying to Sum it? Your expression will take the one field (Twin) in the one record you are looking at, and divide its value by two. I am assuming it is not a repeating field.
What value is in the field Twin?
The field value of twin is 1.
and there are either 1 or 0 in the various records.
and i would like to add all of the twins in the records together then divde it by 2.
The calculation you are using is for THAT single record, not a group of records. You will need a summary field for that. You could also use Getsummary with the summary field.
But when i use the Getsummary, i will get this message:
Only summary fields are allowed as the first arguement in a Getsummary function.
Here is a quick screen print showing my example. In my example each record is a family, with the State they are in and number of kids. Then I create NumKids.sum (my notation indicating the summary field of NumKids. Use the Summary field in Subsummary parts of a layout, when creating a report. For my example sort of State. DispSumm is a calculation field to do math on Summary Field. Hopefully this helps.