---
schema_version: "1"
id: 85e3483b0be71c3ddafdcf0d110f4b399c3272653ac25cfcf394ef9800f5c70c
title: User Defined Rollups (Legacy)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sfdo/264-0-0/npsp_user_defined_rollups.md
canonical_url: https://help.salesforce.com/s/articleView?id=sfdo.npsp_user_defined_rollups.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6743f509fc2268d602e395edb33c70233208af243c379fd06903b02c31a51f2c
description: Review the basics of legacy user defined rollups. Create a user defined rollup and use formula fields to include or exclude fields in your rollups calculations.
products:
  - Nonprofit
release: "264"
---
# User Defined Rollups (Legacy)

Review the basics of legacy user defined rollups. Create a user defined rollup and use formula fields to include or exclude fields in your rollups calculations.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sfdo-nonprofit_success_pack-264-0-0-production-enus/bd2879e2-2bdc-4012-aa32-dc0c697c4538/images/icon_note.png)

Note This article was written at the 2017 NPSP Sprint in Baltimore by these amazing community members: Steve Backman, Tricia Booser, Ben Chastain, Jason Cook, Tim Forbes, Dean Graham, Megan Himan, Ben Mozenter, Loren Serfass, Michael Smith, Emily Wilson, and Jenna Zelenetz.

- **[Overview](https://help.salesforce.com/s/articleView?id=sfdo.npsp_user_defined_rollups.htm&release=264.0.0&type=5)**  
    User Defined Rollups (UDR) let users that work with custom fields on Opportunities summarize that information on Accounts or Contacts. Organizations can create a User Defined Rollup to summarize information based on an Opportunity record, and push that summary information to a field on the Account or Contact record (or Households, for those still using the One-to-One or Individual Bucket model).
- **[Create a User Defined Rollup](https://help.salesforce.com/s/articleView?id=sfdo.npsp_user_defined_rollups.htm&release=264.0.0&type=5)**  
    Create a User Defined Rollup and display the result on the Contact, Account, or Household object. This is an example of creating a rollup for Total Remaining Payment Balance for a Contact.
- **[Use Formula Fields with User Defined Rollups](https://help.salesforce.com/s/articleView?id=sfdo.npsp_user_defined_rollups.htm&release=264.0.0&type=5)**  
    Although there is no way to directly add filters to User Defined Rollups (UDR), you can create formula fields on the Opportunity object with logic to include or exclude records based on criteria you specify. You then use these formula fields as the source Opportunity Field in your User Defined Rollup.

## Overview

User Defined Rollups (UDR) let users that work with custom fields on Opportunities summarize that information on Accounts or Contacts. Organizations can create a User Defined Rollup to summarize information based on an Opportunity record, and push that summary information to a field on the Account or Contact record (or Households, for those still using the One-to-One or Individual Bucket model).

UDRs are calculated based on Closed/Won Opportunities just like out-of-box NPSP rollups, but you define the Opportunity field to roll up, how it will roll up, and in what custom field the rollup data should appear. Most powerfully, organizations can extend UDRs [using formula filters](https://help.salesforce.com/s/articleView?id=sfdo.npsp_user_defined_rollups.htm&release=264.0.0&type=5 "Review the basics of legacy user defined rollups. Create a user defined rollup and use formula fields to include or exclude fields in your rollups calculations.") to summarize only certain subsets of Opportunities.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sfdo-nonprofit_success_pack-264-0-0-production-enus/bd2879e2-2bdc-4012-aa32-dc0c697c4538/images/icon_tip.png)

Tip

In May 2018 (version 3.129), we introduced [Customizable Rollups](https://help.salesforce.com/s/articleView?id=sfdo.npsp_customizable_rollups_overview.htm&release=264.0.0&type=5 "Rolling up donor data is an essential part of fundraising with the Nonprofit Success Pack. And, since every nonprofit is unique, it is especially important that you're able to roll up exactly the data you need, and to the right records.") . With Customizable Rollups, you can roll up Payments (in addition to Opportunities), create filters to include or exclude data, and easily roll up data from more than two years ago. And when you [enable Customizable Rollups](https://help.salesforce.com/s/articleView?id=sfdo.npsp_enable_customizable_rollups.htm&release=264.0.0&type=5 "Turn on functionality to define which fields to roll up and the filters to use. If Customizable Rollups aren't necessary for your organization, disable or reset them.") , we'll convert all out-of-box NPSP rollups and any UDRs you've created into Customizable Rollups so that you can update them as needed.

To learn more about all of the different types of rollups available in the Nonprofit Success Pack, see the [Rollups Overview](https://help.salesforce.com/s/articleView?id=sfdo.npsp_rollups_overview.htm&release=264.0.0&type=5 "Rollup fields are custom fields that display information from other related records, including aggregate totals. To think of this another way, rollup fields allow information from Opportunities or Payments to automatically \"roll up\" and appear on a related Account, Contact, General Accounting Unit, or Recurring Donation records.").

## Create a User Defined Rollup

Create a User Defined Rollup and display the result on the Contact, Account, or Household object. This is an example of creating a rollup for Total Remaining Payment Balance for a Contact.

1. In Setup, create the custom field that will contain your rollup information. The field must be of the same data type as the field you will be rolling up (the Opportunity Field). For our example, you'd create a field with the Type = Currency and name it Total Remaining Payment Balance.
2. Go to NPSP Settings. If you don't see the NPSP Settings tab, you can find it using the App Launcher.
3. Click **Donations | User Defined Rollups**.
4. Click **New User Defined Rollup**.
5. Fill in the required fields. To follow along with the example, enter these values:
    
    1. Opportunity Field = Remaining Balance
    2. Rollup Operation = SUM
    3. Target Object = Contact
    4. Target Field = Total Remaining Payment Balance (Remember, this is the custom field we asked you to create in step 1.)
    
    ![Creating a new User Defined Rollup for Total Remaining Payment Balance](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sfdo-nonprofit_success_pack-264-0-0-production-enus/bd2879e2-2bdc-4012-aa32-dc0c697c4538/nonprofit_success_pack/images/udr_create.png)
6. Click **Create Rollup**.

User Defined Rollups are calculated nightly as part of a batch. You can also [manually recalculate](https://help.salesforce.com/s/articleView?id=sfdo.npsp_manually_recalculate_rollups.htm&release=264.0.0&type=5 "Rollups are calculated in batch jobs as part of the nightly build.") them.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sfdo-nonprofit_success_pack-264-0-0-production-enus/bd2879e2-2bdc-4012-aa32-dc0c697c4538/images/icon_tip.png)

Tip To build more filtering functionality into your UDRs, you can also [use formula fields as the source Opportunity Field](https://help.salesforce.com/s/articleView?id=sfdo.npsp_user_defined_rollups.htm&release=264.0.0&type=5 "Review the basics of legacy user defined rollups. Create a user defined rollup and use formula fields to include or exclude fields in your rollups calculations.").

## Use Formula Fields with User Defined Rollups

Although there is no way to directly add filters to User Defined Rollups (UDR), you can create formula fields on the Opportunity object with logic to include or exclude records based on criteria you specify. You then use these formula fields as the source Opportunity Field in your User Defined Rollup.

For example, you may want to prioritize sustaining donor engagement by displaying recurring donation data on Contacts. To do this, you could create UDRs that aggregate current recurring giving and lifetime recurring giving data. To filter Opportunities to only include those associated with Recurring Donations, you could create formula fields and use them in your UDRs.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sfdo-nonprofit_success_pack-264-0-0-production-enus/bd2879e2-2bdc-4012-aa32-dc0c697c4538/images/icon_tip.png)

Tip With Customizable Rollups, you can easily create groups of filter rules and apply them directly to your rollups. To learn more, check out the [Customizable Rollups article on creating filter groups](https://help.salesforce.com/s/articleView?id=sfdo.npsp_create_a_filter_group.htm&release=264.0.0&type=5 "Find out more about creating filter groups.").

To use a formula field to filter your User Defined Rollup, follow these high level steps:

1. [Create the formula field](https://help.salesforce.com/articleview?id=customize_formulas.htm) on the Opportunity object. This will be the Opportunity Field you select for your UDR.
2. [Create a custom field](https://help.salesforce.com/articleview?id=adding_fields.htm) on either the Account, Contact, or Household object. This will be the Target Field that will contain your rollup data.
3. [Create the User Defined Rollup](https://help.salesforce.com/s/articleView?id=sfdo.npsp_user_defined_rollups.htm&release=264.0.0&type=5 "Review the basics of legacy user defined rollups. Create a user defined rollup and use formula fields to include or exclude fields in your rollups calculations.").

Below are some example User Defined Rollups that use formula fields.

### Example 1: First Active Recurring Date & Last Active Recurring Date

This example creates a UDR that finds and displays the Close Date of the earliest Opportunity associated with a current, active Recurring Donation. You can use the same formula field to create a UDR that displays the Close Date of the most recent Opportunity associated with a current, active Recurring Donation.

1. Create a formula field on the Opportunity object (to use as the Opportunity Field).
    1. Data Type = Formula
    2. Field Label = Recurring Date: Active
    3. Formula Return Type = Date
    4. Formula = `IF ( ISPICKVAL ( npe03__Recurring_Donation__r.npe03__Open_Ended_Status__c, "Open" ), CloseDate , NULL)`
2. Create a custom field on the Contact object (to use as the Target Field).
    1. Data Type = Date
    2. Field Label = First Active Recurring Date
    3. Description = A date field displaying the Close Date of the earliest Opportunity associated with a current, active Recurring Donation.
3. Create a User Defined Rollup with these values:
    1. Opportunity Field = Recurring Date: Active
    2. Rollup Operation = MIN
    3. Target Object = Contact
    4. Target Field = First Active Recurring Date

To create a User Defined Rollup for the Last Active Recurring Date:

1. Create a custom field on the Contact object (to use as the Target Field).
    1. Data Type = Date
    2. Field Label = Last Active Recurring Date
    3. Description = A date field displaying the Close Date of the most recent Opportunity associated with a current, active Recurring Donation.
2. Create a User Defined Rollup with these values:
    1. Opportunity Field = Recurring Date: Active
    2. Rollup Operation = MAX
    3. Target Object = Contact
    4. Target Field = Last Active Recurring Date

### Example 2: First Ever Recurring Date & Last Ever Recurring Date

This example creates a UDR that finds and displays the Close Date of the earliest Opportunity associated with any Recurring Donation. You can use the same formula field to create a UDR that displays the most recent Opportunity associated with any Recurring Donation.

1. Create a formula field on the Opportunity object (to use as the Opportunity Field).
    1. Data Type = Formula field
    2. Field Label = Recurring Date: Ever
    3. Formula Return Type = Date
    4. Formula = IF ( NOT ( ISBLANK(npe03\_\_Recurring\_Donation\_\_c)), CloseDate , NULL)
2. Create a custom field on the Contact object (to use as the Target Field).
    1. Data Type = Date
    2. Name = First Ever Recurring Date
    3. Description = A date field displaying the Close Date of the earliest Opportunity associated with any Recurring Donation.
3. Create a User Defined Rollup with these values:
    1. Opportunity Field = Recurring Date: Ever
    2. Rollup Operation = MIN
    3. Target Object = Contact
    4. Target Field = First Ever Recurring Date

To create a UDR for Last Ever Recurring Date:

1. Create a custom field on the Contact object (to use as the Target Field).
    1. Data Type = Date
    2. Field Label = Last Ever Recurring Date
    3. Description = A date field displaying the Close Date of the most recent Opportunity associated with any Recurring Donation.
2. Create a User Defined Rollup with these vales:
    1. Opportunity Field = Recurring Date: Ever
    2. Rollup Operation = MAX
    3. Target Object = Contact
    4. Target Field = Last Ever Recurring Date

### Example 3: Recurring Donation Amount

This example creates a UDR that finds and displays the Recurring Donation Amount value, if the Opportunity is associated with a Recurring Donation record whose Open Ended Status is set to Open.

1. Create a formula field on the Opportunity object (to use as the Opportunity Field).
    1. Data Type = Formula field
    2. Field Label = Recurring Donation Amount
    3. Formula Return Type = Currency
    4. Decimal Places = 2
    5. Formula = IF ( ISPICKVAL ( npe03\_\_Recurring\_Donation\_\_r.npe03\_\_Open\_Ended\_Status\_\_c, "Open" ), npe03\_\_Recurring\_Donation\_\_r.npe03\_\_Amount\_\_c , NULL)
2. Create a field on the Contact object (to use as the Target Field).
    1. Data Type = Currency
    2. Field Label = Recurring Donation Amount
    3. Description = A currency field displaying the Donation Amount value of a current, active Recurring Donation.
3. Create a User Defined Rollup with these values:
    1. Opportunity Field = Recurring Donation Amount
    2. Rollup Operation = MAX
    3. Target Object = Contact
    4. Target Field = Recurring Donation Amount

![The list of User Defined Rollups that were created by following the examples in this article.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sfdo-nonprofit_success_pack-264-0-0-production-enus/bd2879e2-2bdc-4012-aa32-dc0c697c4538/nonprofit_success_pack/images/udr_examples.png)