Find Proportions with PARENTGROUPVAL()
PARENTGROUPVAL() returns the value of a specified parent group, which is any level above the one on which the formula is evaluated. If a report has only one group (like Lance’s opportunity report grouped by Close Month), then the report grand total values are “above” the one group. The report grand totals are always the most senior group.
The formula for PARENTGROUPVAL() is written as PARENTGROUPVAL(summary_field, grouping_level). Here’s how it breaks down.
summary_field is the value from the grouped row or column (like AMOUNT:SUM).
grouping_level is the name of a parent-level value in the report (like GRAND_SUMMARY for the overall total).
Ursa Major has received an alarming influx of cases recently, and Gabriela Livingston, the head of sales operations, wants to get to the bottom of it. She asks Ada Belawa, the company’s product support specialist, to create a case report grouped by type, to find out what percentage of cases belongs to each type. Let’s help Ada build a case report and add a custom summary formula with PARENTGROUPVAL() to tease out this information.
Create a case report.
Click Reports.
Click New Report.
From the Select a Report Type menu, search for and select Cases.
Click Start Report.
Group the report by Type.
To open the outline pane, click Outline.
Under Group Rows, click Add group, then search for and select Type.
Click Save.
Name the report Case Percentages by Type and set the Report Unique Name to CASE_PERCENTAGES_BY_TYPE.
Click Save.
From the Columns pane in the overview panel, click Down arrow, then select Add Summary Formula.
For Column Name, enter Percent of Total.
For Formula Output Type, select Percent.
In the Formula field, paste RowCount/PARENTGROUPVAL(RowCount, GRAND_SUMMARY).
In Display select Selected Groups.
Verify that Row Group has Type selected.
To verify that the formula is valid for the selected display option, click Validate.
Click Apply.
Click Save & Run.
Now the Percent of Total column you created appears in the report and gives Ada a better look at where Ursa Major’s quality control team can focus their efforts next.
#salesforce #istampers #trailhead
6 сен 2024