Table of Contents
ToggleWhat Are Roll-Up Summary Fields in Salesforce?
Roll-up summary fields are a powerful, point-and-click feature in Salesforce that let you automatically calculate and display aggregated values on a master record based on data from its related detail records.
In simple terms: instead of manually adding up numbers across related records, roll-up summary fields do the math for you — and keep it updated in real time.
For example, imagine you want to know the total value of all Opportunities linked to an Account. Rather than running a report every time, a roll-up summary field on the Account object can automatically show you the sum at a glance.
Key Insight: While formula fields calculate values using fields within a single record, roll-up summary fields calculate values from a set of related records — such as those in a related list.
Roll-Up Summary Fields vs. Formula Fields
Understanding the difference between these two field types is crucial for any Salesforce Admin:
| Feature | Formula Field | Roll-Up Summary Field |
|---|---|---|
| Scope | Single record | Multiple related records |
| Relationship required | No | Yes (Master-Detail only) |
| Supported operations | Complex expressions | COUNT, SUM, MIN, MAX |
| Real-time update | Yes | Yes (with some delay) |
| Cross-object capability | Limited (via cross-object formulas) | Native (detail → master) |
Roll-up summary fields are your go-to when you need to aggregate data across related records — something formula fields simply cannot do on their own.
Prerequisites: Master-Detail Relationships
Before you can create a roll-up summary field, you must have a Master-Detail relationship in place between two objects.
Master-detail relationships closely link two objects so that:
- The master record controls behaviors of the detail record (like deletion)
- The detail record cannot exist without the master
- Roll-up summary fields can only be defined on the master side of the relationship
Common Master-Detail Examples in Salesforce
- Account (Master) → Opportunities (Detail)
- Opportunity (Master) → Opportunity Products (Detail)
- Custom Object (Master) → Custom Related Object (Detail)
Important: Roll-up summary fields do not work with Lookup relationships — only Master-Detail relationships are supported.
Types of Roll-Up Summary Calculations
Salesforce supports four types of roll-up summary calculations:
1. COUNT
Totals the number of related records in the detail object.
Example: Count of open Opportunities on an Account.
2. SUM
Totals the values of a specified numeric field across all related detail records.
Available field types: Number, Currency, Percent.
Example: Sum of Opportunity Amounts on an Account.
3. MIN
Displays the lowest value of a specified field across all related records.
Available field types: Number, Currency, Percent, Date, Date/Time.
Example: Earliest Opportunity Close Date on an Account.
4. MAX
Displays the highest value of a specified field across all related records.
Available field types: Number, Currency, Percent, Date, Date/Time.
Example: Most recent Activity Date on an Account.
How to Create a Roll-Up Summary Field (Step-by-Step)
Here is the complete, step-by-step process to create a roll-up summary field in Salesforce. In this example, we’ll create a Sum of Opportunities field on the Account object.
Step 1: Go to Setup
Log in to Salesforce and click the gear icon in the top-right corner, then select Setup.
Step 2: Open Object Manager
In the Setup menu, navigate to Object Manager using the Quick Find search box or the top navigation.
Step 3: Select the Master Object
Click on Account (this is your master object).
Step 4: Navigate to Fields & Relationships
In the left-hand sidebar, click Fields & Relationships, then click the New button.
Step 5: Choose Field Type
From the list of available data types, select Roll-Up Summary and click Next.
Step 6: Enter Field Label
Enter a descriptive label such as Sum of Opportunities and click Next.
Step 7: Configure the Roll-Up
- Summarized Object: Select Opportunities (this is your detail object)
- Roll-Up Type: Select SUM
- Field to Aggregate: Select Amount
Tip: If you can’t see “Amount” in the Field to Aggregate dropdown, check whether Advanced Currency Management is enabled in your Currency Setup — disabling it should resolve the issue.
Step 8: Set Filter Criteria (Optional)
You can optionally add filter criteria to only roll up a subset of detail records. For example, only sum Opportunities with Stage = Closed Won.
Step 9: Set Field-Level Security
On the next screen, configure which profiles can see this field. Click Next.
Step 10: Add to Page Layouts
Select which page layouts should display this field, then click Save.
Your roll-up summary field is now live and will automatically calculate values from related records!
Real-World Examples of Roll-Up Summary Fields
Example 1: Total Opportunity Revenue on an Account
Use case: A sales manager wants to see the total pipeline value for each account without running a report.
- Master Object: Account
- Detail Object: Opportunity
- Roll-Up Type: SUM
- Field to Aggregate: Amount
- Result: The Account record shows the total value of all related Opportunities.
Example 2: Date of First Opportunity Created
Use case: Marketing wants to know when each account first entered the sales pipeline.
- Master Object: Account
- Detail Object: Opportunity
- Roll-Up Type: MIN
- Field to Aggregate: Created Date
- Result: The earliest Opportunity Created Date appears on the Account record — giving you the account’s first engagement date.
Example 3: Total Price of All Products on an Opportunity
Use case: A sales rep needs to see the grand total of all line items on an Opportunity.
- Master Object: Opportunity
- Detail Object: Opportunity Product
- Roll-Up Type: SUM
- Field to Aggregate: Total Price
- Result: The Opportunity record displays the combined total of all related products.
Example 4: Minimum List Price of Products
Use case: A pricing team wants to quickly identify the lowest-priced item on each Opportunity.
- Master Object: Opportunity
- Detail Object: Opportunity Product
- Roll-Up Type: MIN
- Field to Aggregate: List Price
- Result: The Opportunity shows the lowest list price among all its related products.
Example 5: Count of Open Cases on an Account
Use case: A support manager wants to see how many open cases each account currently has.
- Master Object: Account
- Detail Object: Case
- Roll-Up Type: COUNT
- Filter Criteria: Status does NOT equal Closed
- Result: The Account record always displays the number of active open cases.
Roll-Up Summary Field Limitations
While roll-up summary fields are incredibly useful, there are important limitations every Salesforce Admin must know:
1. Only Supported on Master-Detail Relationships
Roll-up summary fields cannot be created on Lookup relationships. The objects must have a Master-Detail relationship.
2. Cannot Reference Formula Fields
You cannot use a formula field from the detail object as the “Field to Aggregate.” Only standard and custom fields of supported data types are available.
3. Field Type Restrictions by Roll-Up Type
- SUM: Only Number, Currency, and Percent fields
- MIN/MAX: Number, Currency, Percent, Date, and Date/Time fields
- COUNT: No field selection needed (counts all or filtered records)
4. Recalculation Delays
While roll-up summary fields update automatically, there can be slight delays during mass updates or data imports via Data Loader or external APIs.
5. Limit Per Object
Salesforce imposes limits on the number of roll-up summary fields per object. Be mindful of this when designing your data model. Check the most current limits in your Salesforce org’s governor limits documentation.
6. Cannot Be Used in Certain Formula Contexts
Roll-up summary fields have restrictions when referenced inside other formulas, especially in complex cross-object scenarios.
7. Polymorphic Relationships Not Supported
Roll-up summary fields do not support objects involved in polymorphic relationships (where a single field can refer to multiple object types).
8. Not Available on External Objects
Roll-up summary fields are not supported on Salesforce External Objects (objects sourced via Salesforce Connect).
Best Practices for Roll-Up Summary Fields
Follow these best practices to make the most of roll-up summary fields in your org:
1. Plan Your Data Model First
Identify master-detail relationships in your data model before creating roll-up fields. Having a clear schema (use Schema Builder for visualization) prevents rework later.
2. Use Filter Criteria Wisely
Don’t roll up every record — use filter criteria to include only the records that matter. For example, only sum Closed Won Opportunities instead of all Opportunities.
3. Name Fields Clearly
Use descriptive names like Total Closed Won Revenue or Count of Open Cases so users instantly understand what the field represents.
4. Test Before Deploying
Always test roll-up summary fields in a Sandbox before deploying to production, especially when they involve large data volumes.
5. Monitor Performance
On large orgs with millions of records, roll-up summary fields can trigger recalculations that impact performance. Monitor and test under realistic data volumes.
6. Document Your Fields
Add clear descriptions in the field’s “Description” and “Help Text” fields so future admins understand the purpose and logic.
Frequently Asked Questions
Q: Can I create a roll-up summary field on a Lookup relationship?
A: No. Roll-up summary fields are only supported on Master-Detail relationships. If you need roll-up-like functionality on a Lookup relationship, consider using a third-party tool or Apex triggers.
Q: Can I filter which records are included in a roll-up summary?
A: Yes! When creating the field, you can define filter criteria to include only records that meet certain conditions — for example, only Opportunities with Stage = Closed Won.
Q: Do roll-up summary fields update in real time?
A: They update automatically whenever a related record is created, edited, or deleted. However, there can be processing delays during large-scale data operations.
Q: How many roll-up summary fields can I create per object?
A: Salesforce sets limits on the number of roll-up summary fields per object. You can find the current limits in Salesforce’s official documentation or by checking your org’s Setup.
Q: Can a roll-up summary field reference another roll-up summary field?
A: No. You cannot directly reference a roll-up summary field inside another roll-up summary calculation. However, you can use a roll-up summary field as an input in a formula field on the same object.
Q: What happens to a roll-up summary field if I change the relationship type from Master-Detail to Lookup?
A: You cannot convert a Master-Detail relationship to a Lookup if there are existing roll-up summary fields dependent on it. You must delete the roll-up summary fields first.
Take Your Salesforce Admin Skills to the Next Level
Ready to Master Salesforce — and Ace the Admin Certification Exam?
Roll-up summary fields are just one piece of the Salesforce Admin puzzle. To truly stand out as a certified Salesforce Administrator, you need a deep, structured understanding of the entire Salesforce platform — from data modeling and automation to security, reports, and dashboards.
- Comprehensive, exam-focused curriculum
- Hands-on practice with real Salesforce scenarios
- Step-by-step guidance from beginner to certification-ready
- Covers every topic in the Salesforce Administrator exam guide
Whether you’re a complete beginner or an experienced professional upskilling for certification, this course gives you everything you need to pass the exam with confidence.
Conclusion
Roll-up summary fields are one of the most practical and time-saving tools in a Salesforce Admin’s toolkit. They eliminate the need for manual calculations, give business users instant visibility into aggregated data, and keep information accurate without any extra effort.
To recap what we’ve covered:
- Roll-up summary fields aggregate values from detail records onto a master record
- They require a Master-Detail relationship between objects
- The four roll-up types are COUNT, SUM, MIN, and MAX
- They come with important limitations around field types and relationship types
- Following best practices ensures they perform well even at scale
Mastering roll-up summary fields — along with formula fields, validation rules, automation tools, and more — is what separates a great Salesforce Admin from a good one.
Ready to go deeper? Check out the MyTutorialRack Salesforce Admin Certification Course and accelerate your journey to Salesforce certification today.




