Sub topic 8
Bucket fields for ad hoc categories
This chapter assumes you can build a summary report, add row groupings, and use filters in Lightning Experience. A bucket field lets you sort report values into named groups without creating a custom field. You can then use that bucket as a grouping.
What a bucket field is
A bucket field is a report-only column. It reads the values of a source field and places each record into a bucket you define. The bucket exists only in that report. Nothing is stored on the object, and other reports cannot see it.
Use a bucket field when you need a quick category and don't want to ask an admin for a custom formula field or picklist value.
Buckets work with three kinds of source fields:
- Picklist fields, such as Stage or Lead Source.
- Number fields, such as Amount or Employees. You define ranges.
- Text fields, such as Billing Country. You pick values to combine.
Worked example: deal size
Suppose you want to see how many opportunities are small, medium, or large, and what each size is worth. Amount is a number, so you bucket it into ranges.
- Open a summary report on Opportunities.
- In the Outline panel, choose Add Bucket Column.
- Pick Amount as the source column.
- Name the bucket field Deal Size.
- Create three buckets and set their ranges:
| Bucket name | Range |
|---|---|
| Small | below 10,000 |
| Medium | 10,000 to below 50,000 |
| Large | 50,000 and above |
- Save the bucket, then drag Deal Size into Group Rows.
- Add Sum of Amount and Record Count as summaries.
The report now shows one group per size, with a total and a count for each. A record with no Amount goes to the "Other" group, or you can leave it unbucketed.
Bucketing text and picklist values
For a picklist, you combine several values into one bucket. You might group the stages Prospecting and Qualification into "Early", and Negotiation and Proposal into "Late". Select each value and drag it into the bucket you want. Values you leave out can go to a bucket named "Other".
This is useful when a picklist has many values and the question only needs two or three categories.
Where bucket fields help
- As a row or column grouping in summary and matrix reports.
- As a filter, to show only records in one bucket.
- In a chart, because a grouped bucket field can be a chart axis.
Common errors
- Overlapping ranges. Ranges are evaluated from the lowest to the highest. Keep the boundaries clear so a value falls in only one bucket.
- Expecting reuse. The bucket belongs to one report. If you clone the report, the bucket comes with the copy. A different report needs its own bucket.
- Unplaced values. Values you don't assign are either left ungrouped or sent to "Other", depending on your setting. Check that the Other group is not hiding data you care about.
- Wrong source type. You can't turn a number into text labels by choosing a text source. Pick the field that holds the values you want to group.
- Too many buckets. A report allows a limited number of buckets per field and a limited number of bucket fields. If you need more, ask an admin for a formula field.
Exercise
Exercise
You want a summary report of Accounts grouped as "Small" (under 100 employees), "Mid-size" (100 to 999) and "Enterprise" (1,000 or more). Which source field type and which step do you use, and why not create a custom field?
Show answer
Use Add Bucket Column with the Employees number field as the source, and define three ranges. Then drag the bucket into Group Rows. A bucket is report-only, so it needs no admin work, no deployment and no change to the Account object. Use a custom field only if other reports need the same categories.