8 differences between summary formulas and row-level formulas in Salesforce reports
5 min
Salesforce summer’20 release brought a revolution in the field of reports. It introduced row-level formulas in Salesforce Lightning Experience. It is a very productive win for admins as earlier they had to export the report to apply formulas to it.
- The reason for its appreciation by users include:
- Calculation on every row can be done.
- Not restricted to numeric values only. It can be used to apply the formula in other fields with standard formula operations.
- No need to create a field in the object to display the formula. Thus reducing a number of formula fields.
- Summary formulas have been in Salesforce for quite a while now and have their own success stories due to few of the points stated below:
- Can calculate additional totals in Summary, Matrix, and Joined reports.
- Applied to numeric fields which can be summarized.
- Used with expressions, fields, and values
People do misunderstand that summary formulas and row-level formulas are the same. But I am afraid they are not. The difference will be apparent to you once you read this article.
For better understanding let us have some scenarios. Before that, let's get to know the steps to add summary formulas and row-level formulas in the reports. This will give a better hand on this topic.
Steps to add a custom summary formula to a report
- Select/ create the report in which formula needed to be added.
- In the Outline pane, under the “Columns” section click Select “Add Summary Formula”
- Fill in the details like: Column Name, Description, Formula Output Type, and Decimal Points.
- In the Formula section, the Field section can be used to search the field on which formula needs to apply.
- In the Function section, we can select the operator that is needed.
- Click “Apply” . To check for errors before “Apply”, click ”Validate”.
- On the report page, a new column with the name given for the summary formula appears.
- Click “Save & Run” to save and run the report.
Steps to add row-level formula to a report
- Select/ create the report in which formula needed to be added.
- In the Outline pane, under the “Columns” section click Select “Add Row-Level Formula”.
- A new window “Edit Row-Level Formula Column” opens. Fill the fields like: Column Name, Formula Output Type, Formula
Description: (Optional) and Decimal Points. Check for errors clicking ”Validate”, then, click “Apply” - On the report page, a new row appears that gives the value after applying the formula.
- Click “Save & Run” to save n run the report.
Example 1:
When needed to know the percentage of closed opportunities that is actually being won.
What do you think should be used? Row-level or summary formula?
We can use the summary formula.
- Use the filter to get the records that have opportunities closed.
- Group by a field you would like to summarize by (if you only care about the totals, this doesn't mind)
- Then using a custom summary formula find the sum of won and apply
formula =sum(won) /sum(Closed)
Example 2:
When we need to know the count of Leads depending on the location
You thought it right. It will be the summary formula.
Example 3:
To know the opportunities that have an owner other than the one stated in Account
This time its row-level formula
Example 4:
When comparing a company’s sales with targeted sales
The summary formula for this one
Example 5:
To check if shipping address is the same as the billing address
For this, it will be a row-level formula
Now at the end to say who has the upper hand (Summary or Row-level formula) would not be correct. As both have different uses and both are useful in their own sense and it all depends on the requirements.