Supported roll-up aggregate functions
Key Takeaway
The roll-up type decides which fields you can aggregate. SUM works with only number, currency, and percent fields, while MIN and MAX also work with date and date/time fields.
A roll-up summary field shows a value on a master record, calculated from that record's related detail records in a master-detail relationship. It supports four roll-up types: COUNT, SUM, MIN, and MAX. The roll-up type you pick decides which detail fields you can aggregate.
What a roll-up summary field is and where you can create one
A formula field calculates its value from fields on a single record. A roll-up summary field instead calculates its value from a set of related records, such as the records in a related list.
You define a roll-up summary field on the master object, which is the object on the master side of a master-detail relationship. The detail records must be directly related to that master record.
You can create roll-up summary fields on these objects:
- Any custom object on the master side of a master-detail relationship
- Any standard object on the master side of a master-detail relationship with a custom object
- Opportunities, using opportunity products
- Accounts, using opportunities
- Campaigns, using campaign member status or campaign member custom fields