Aggregate functions in FileMaker: Sum, Count, Average, Max, Min

Beginner

FileMaker's aggregate functions operate across related records in a portal or repeating field. Learn how Sum, Count, Average, Max, and Min work in calculation fields and how to use them on related data.

What you'll learn

  • How Sum(), Count(), Average(), Max(), and Min() aggregate related field values
  • The difference between using aggregates in calculation fields vs summary fields
  • When an aggregate returns 0 vs empty for a related table with no records

Aggregate functions in FileMaker calculations operate on all related records in a relationship, making them the standard way to total, count, and analyze portal data without scripting.

1/2
1

Sum related record values in a calculation field

Place an aggregate function in a calculation field in the parent table and reference the related field. FileMaker automatically aggregates across all related records.

FileMaker Script
// In the Orders table, a calculation field that totals all line items:
Sum ( LineItems::lineTotal )

// Count related records
Count ( LineItems::id )

// Average, Max, Min
Average ( LineItems::unitPrice )
Max     ( LineItems::lineTotal )
Min     ( LineItems::unitPrice )

Sign in to track your progress and pick up where you left off.

Sign in to FM Dojo