User manual

Table Of Contents
11-8
FileMaker Pro User’s Guide
See below for examples of each of these situations.
The following examples show how the Sum function works,
depending on the number of parameters, whether the calculations
involve related, repeating, or non-repeating fields, and whether
results are returned in a repeating or non-repeating field. In these
examples, the numbers in the boxes represent values in fields.
Note You can use aggregate functions to summarize data in a file, as
an alternative to Summary fields. See “Summarizing data in portals”
on page 8-12.
Summary functions
Summary fields generate grand totals or subtotals of data from many
records. For more information, see “Defining summary fields” on
page 5-6, and “About layouts and reports” on page 6-1.
Use the GetSummary function with a summary field when you want to:
1 display subsummary values in Browse mode or in a body part
1 perform mathematical calculations on a summary field
This function Does this
Average (field...) Averages the numbers, dates, or times in the (field...)
parameter(s) you specify
Count (field...) Returns the number of items [the (field...) parameter(s)
you specify], which are not empty
Max (field...) Returns the largest number or time or the latest date in
the (field...) parameter(s) you specify
Min (field...) Returns the smallest number or time or the earliest date
in the (field...) parameter(s) you specify
StDev (field...) Returns the standard deviation of the sample
represented by a series of values in the (field...)
parameter(s) you specify
StDevP (field...) Returns the standard deviation of a population
represented by a series of values in the (field...)
parameter(s) you specify
Sum (field...) Adds the numbers or times in the (field...) parameter(s)
you specify.
1
2
3
4
1
Field 1
Field 2
Field 3
E
xamp
l
e
1
Sum (
Field 1
,
Field 2
,
Field 3
)
2
3
6
+
E
xamp
l
e 2
Portal
Related field
+
Sum (
Relationship
name
::
Related field
)
10
1
2
3
4
Example 3
10
Repeating field
Sum (
Repeating field
)
+
1
2
3
4
Example 4
Repeating
field 1
Sum (
Repeating field 1
,
Repeating field 2
)
1
2
3
4
2
4
6
8
Repeating
field 2
+ =
Related
field 1
Sum (
Relationship name
::
Related field 1
,
Relationship name
::
Related field 2
)
Example 5
Related
field 2
1 4 5
+
=