Loading

Percentage of Grand Total at Summary Level in Reports

Udgivelsesdato: Jul 2, 2024
Beskrivelse

If you're looking to show a report grouping's share of the grand total, add a custom summary formula at the summary level from the "Fields" pane in Reports. 

Løsning

In Summary Formulas,  you can choose which groups they apply to, as well as whether it should be calculated for the Grand Total level. The report should be grouped by at least one field to follow the instructions below.   

 Create a custom Summary Formula

1. Under Summary Formulas in the "Fields" pane, double-click Create Formula.

2. Enter a Column Name for the formula. This is the column header as you want it to appear on your report.

3. In the Description field, enter a brief description of the formula.

4. From the Formula Output Type picklist, select Percent.

5. Under Decimal Places, select the number of decimal places to be displayed.

6. Select the Display tab where the calculated formula should be displayed – select Specific Groups and then the desired grouping field (Row Group) to calculate percentage according to rows.

7. Build your formula:

  • To display the percentage of fields by grouping at a summary level, select the RowCount in the formula to consider the total number of rows in each grouping and use the formula structure PARENTGROUPVAL(summary_field, grouping_level)
  • Complete Formula:  RowCount / PARENTGROUPVAL(RowCount, GRAND_SUMMARY). This is taking the total count of the rows for each group, and dividing by the row count at the Grand Total level.  If you see the warning to select a grouping context, make sure the formula is set to Specific Groups such as Account Name.
  • Example: To calculate the percentage of the number of activities logged against each account, group the report by Company/Account name and then use the formula : RowCount / PARENTGROUPVAL(RowCount, GRAND_SUMMARY).
  • You can't plot summary formula(in a Y-axis) If in the source report the formula applied at a row group's grand total 

 

Matrix format reports

If you have a Matrix format report, the formula "RowCount / PARENTGROUPVAL(RowCount, GRAND_SUMMARY)" will result in an error reading, "Error: Invalid custom summary formula definition: Incorrect number of parameters for function 'PARENTGROUPVAL()'. Expected 3, received 2."

This error occurs because 3 parameters must be defined for this report format. For example: PARENTGROUPVAL(summary_field, parent_row_grouping, parent_column_grouping)

For Matrix format reports, your complete formula would be RowCount / PARENTGROUPVAL(RowCount, ROW_GRAND_SUMMARY, COLUMN_GRAND_SUMMARY)

For further information about the PARENTGROUPVAL formula, review the article "PARENTGROUPVAL and PREVGROUPVAL." 


Yderligere ressourcer

Video - Salesforce Support using a Summary Formula - Add Row Count as Column to a Report

Add a Summary Formula Column to a Report

Get the most out of Summary Formulas

Vidensartikelnummer

000386586

 
Indlæser
Salesforce Help | Article