Salesforce Report – How To Use Bucket Field in Formula Field

You can create something called ‘Bucket’ field in Salesforce. With Bucket fields you can categorize the records in the report itself and on the fly. You don’t need to create a custom field on the object for this.

For example, let say that if you are creating a report on Opportunity and want to categorize the opportunities in the buckets of ‘small’, ‘medium’ & ‘large’ based on the opportunity amount. You don’t need to define this category as a formula field on the Opportunity object. You can create a bucket field in the report and categorize opportunity records on the fly in report itself.

And then once you have created the bucket field, you can also use this in a formula field in the report. So, if I continue from the example above, now let’s say that I want to calculate what % of these opportunities are small opportunities, what % is medium & what % is large opportunities.

If you were not aware of these capabilities of Salesforce reports, you are in for a pleasant surprise. In this step-by-step guide we will take a look at

  • How to add a bucket field to the report 
  • How to use the bucket field in a formula field

And it won’t take more than 15-20 minutes of your time to understand all this. So let’s dive right in.

Not an “All Access” Pass Member Yet?

Get Download Access to this & 150+ More Step-by-Step Guides with “All Access” Pass. A simple and single plan to access our entire library of courses, guides, workshops & masterclasses on Salesforce.

References & Useful URLs

16 thoughts on “Salesforce Report – How To Use Bucket Field in Formula Field”

  1. I am using SaleForce to track our CNPS survey responses. I have created a bucket of our customer responses with 3 catagories in the Bucket (Promoters/Passives/Detractors) and called it “Customer Responses”. I would like to calculate our NPS score which is calculated using the following sum:
    Promoters minus detractors divided by total number of responses.

    What is the summary formula I need to create that will calculate the NPS score by counting the number of promotors and detractors from my bucket and then subtracting one from the other before dividing it by the RowCount?

    1. Hi Emma,

      How are you storing the Promoters, Passives and Detractors in your object? If you can share the structure of your object for these fields and the value that gets captured, I will see if I will be able to help you.


  2. Is there a means to create a formula which returns a sum for only a subset of the buckets at the grand total location?

  3. Pingback: Tricks all Salesforce Admins Need part 4 of 7 – The Power of the Bucket #ForceFriday | Salesforce Quest

  4. Hi Ash – Could you help me with the syntax for the following formula to calculate the Ratio of columns Won/New Opps. I created a bucket field with two values: Won, New which show up as 2 columns on my report. Need help with using column values and not row values.

    Bucket Field Won Opps | Bucket Field New Opps | Ratio of Won/New
    1 5 .20

    Need help with formula syntax below to give me the results above. Thank you so very much for assistance.

    RowCount/PARENTGROUPVAL(RowCount, ROW_GRAND_SUMMARY, BucketField_25017921)

  5. How do I follow this step? “So to retrieve the API Name for Bucket Field, open the report definition in IDE (eclipse) “

  6. How do you create a formula based on a specific bucket value though?
    I want to be able to show if Bucket value = X display the amount of 10000

  7. Hi Ashis, I can 1up that. If there’s a single bucket field, it will show within the page source of the bucket distribution setup. So no need to fire up the IDE… ugh. Just typing ‘Eclipse’ gives me the creeps. 🙂

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top
Introducing All Access Pass