Sub topic 12
Common groupings and cross-block comparisons
This chapter assumes you can build a summary report, add a row grouping, and have created at least one joined report with two blocks. You should also know what a custom summary formula is.
Why common groupings matter
A joined report holds up to five blocks. Each block has its own report type, its own filters, and its own groupings. Blocks do not line up on their own. To compare them, you need a common grouping: a field that more than one block uses, so Salesforce can match rows across blocks.
Without a common grouping, the blocks sit side by side as separate tables. With one, the shared values form a single axis for the whole report.
How Salesforce finds common groupings
You group each block by a field. When two blocks are grouped by fields that Salesforce considers the same, that field appears under Common Fields in the report's field panel. Typical matches are:
- The same field on the same object, such as Close Date on two Opportunity-based blocks.
- Equivalent fields reached through different report types, such as Account Name from an Opportunities block and from a Cases block.
If a field is missing from Common Fields, the blocks do not share it. Check the report types first, because a field that is not on both types cannot be common.
Building a cross-block comparison
Suppose you want to compare Opportunity revenue with support Cases for each account.
- Create a joined report. Use the Opportunities report type for the first block.
- Add a block using the Cases report type.
- Group each block by Account Name.
- In the Common Fields area, drag Account Name to the common grouping area.
- Add a summary to each block: Sum of Amount for opportunities and Record Count for cases.
Each account now appears once, with opportunity totals and case counts next to each other.
Cross-block formulas
A cross-block custom summary formula uses summaries from different blocks. You reference a block summary by the block name, for example B1#AMOUNT:SUM and B2#RowCount. This formula gives opportunity revenue per case:
B1#AMOUNT:SUM / B2#RowCountCreate it from the report's Add Cross-Block Custom Summary Formula option. Set the formula's grouping level to the common grouping, so it is calculated for each account.
Common errors
| Problem | Likely cause | Fix |
|---|---|---|
| No common fields listed | Blocks are grouped by unrelated fields | Group each block by an equivalent field first |
| Account missing from one block | That block has no matching records | Expected behavior. Rows appear only where data exists |
| Totals differ from a single report | Blocks have different filters | Compare the filters on each block |
| Date groupings do not match | Different date granularity, such as Month and Year | Use the same granularity in each block |
Exercise
Exercise
A joined report has an Opportunities block and a Cases block, both grouped by Account Name. You want average opportunity amount per case for each account. Which field do you use for the formula's grouping level, and why does a zero guard matter?
Show answer
Use the common grouping, Account Name, so the formula is calculated per account. A guard matters because accounts with no cases give a zero or missing case count, and dividing by it causes an error. For example, IF(B2#RowCount = 0, 0, B1#AMOUNT:SUM / B2#RowCount).
Exercise
You expect Close Date to appear under Common Fields, but it does not. Name two things to check.
Show answer
Check that both blocks are grouped by a date field that exists on both report types, and that the date granularity matches. If one report type lacks the field, it cannot be common.