function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MrBrianMrBrian 

Using prevgroupval as a summary field for parentgroupval report formula

Hello,

I am trying to create a report that shows cumulative install base and then our cumulative returning customers, and then use a formula to get a percentage for each year.

To achieve the cumulative record count for install base and returning customers, I am adding the row counts using parentgroupval:
(RowCount
 +
IF(NOT ISBLANK(PREVGROUPVAL(RowCount, Account.Customer_Since__c,1)),
PREVGROUPVAL(RowCount, Account.Customer_Since__c,1), 0)

... for each column in the report
But when I go to get the percentage, I want my formula to look like this:
Numerator /

PARENTGROUPVAL(
PREVGROUPVAL(Account.Record_Count_Manual__c:SUM, Account.Customer_Since__c)

, ROW_GRAND_SUMMARY, Account.Customer_Since__c)
but I am getting the message: 
Error: Invalid custom summary formula definition: Incorrect argument type for function 'PARENTGROUPVAL()'. .

Am I missing something? Is there a way to use the prevgroupvalue inside the parentgroupval? Or, is there a way to reference another formula as the summary field in parentgroupval?

I appreciate the assistance.

User-added image
Alain CabonAlain Cabon
Get the Most Out of Summary Formulas: Tips, Limits, and Limitations

Summary formulas are a powerful reporting technique, but they can be tricky.
Here are some tips, limits, and limitations to keep in mind when working with them.

A summary formula can't reference another summary formula.

https://help.salesforce.com/articleView?id=reports_csf_tips.htm&type=5

Nothing wrong, just forbidden and the error message is often not quite telling.
MrBrianMrBrian
@Alain Thank you, is there a workaround for my use case?
Alain CabonAlain Cabon
Hi Brian,

For the workarounds, the list is relatively short:

1) export the details in Excel format and calculate the missing values with a spreadsheet (run  the report + "Export details")
2) the cumulative values can only appear in summary reports or charts (Line charts).