There are multiple powerful report formulas available in Salesforce. The ParentGroupVal function is one of the rarely used features of Salesforce reporting. Here you learn how to create a summary report by using the PARENTGROUPVAL() function. For reports that are grouped by rows (summary) and for joined reports: PARENTGROUPVAL(summary_field, grouping_level).

Where summary_field is the summarized field value, grouping_level is GRAND_SUMMARY or the API name of the parent level group for summary reports.

Business Use Case

David is working as a System Administrator at Appiuss Software. He received the following requirement from his manager – Add a Percentage Total to an opportunity Summary Report.

Opportunity StageOpportunity Amount% of Total Opportunity Amount
Closed Won50,00050%

We will use PARENTGROUPVAL() function to solve the above requirement and see how a report grouping shares the Grand Total. Add a custom summary formula at the summary level from the “Fields” pane in Reports.

Perform the following steps to solve the above business requirement

Step – 1: Log-in into your developer org.

Step – 2: Navigate to Reports tab, Click on it and Click New Report Button.

Step – 3: Choose Report Type and Click on Continue Button.

Step – 4 : Add column to the report. Select Amount from Columns and  then select  Sum by clicking on Column Edit. Click on Apply button

Step – 5 : Under Group Rows, Select Stage.

Step – 6 : Disable Detail Rows.

Step – 7 : Now under Summary Formula, click on + Create Formula.

Step – 8 : Fill the details, 

  1. Column Name: % of Opportunity Amount  [This will be the column header as you want it to appear on your report]
  2. Formula Output Type Picklist : Percent
  3. Decimal Points: 2 [OR select the number of decimal places to be displayed]
  4. Display Tab: Select Specific Groups
  5. Row Group: Stage [to calculate percentage according to rows]
  7. Click on the Validate button to check your formula is correct.

Step -9 : Click Apply.

Step -10 : Click on Save and Run.

You are done!

I would love to hear from you! What did you learn from this post? Share your tips in the comments!  

Join our newsletter.

No spam, just learning!

Continue Reading

Get a free consultation.

Call us today at (469) 790-0063

Schedule a Consultation

One Comment

  1. Rekha October 8, 2021 at 5:05 pm - Reply

    Nicely explained.

Leave a Reply