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

PREVGROUPVAL - use formula from previous group

I'm trying to create a report where I need to sum the previous group values which is a fomula field. I'm trying to use PREVGROUP function and plugin the formula field name, but it says it's an invalid field.

My end goals is to create a report of revenue for each case (which is an incident) based on the billing records and the product on the billing record. One case can have many billing records and each billing record has one product (lookup to the Product object). I need to sum up the revenue based on the product from the billing because each product can have a different incident rate. I'm not really sure how to sum these up at each level.

The formula for the BillingProductRevenue field is:
(FK_Product2.Per_Incident_Hours__c:MAX*FK_Product2.Per_Incident_Rate__c:MAX) + ((Billing__c.Hours_Worked__c:SUM-FK_Product2.Per_Incident_Hours__c:MAX) *FK_Product2.Per_Incident_Overage_Rate__c:MAX)

Here's my report. for the first record at the case level, the total Revenue should be 174 + 116.50=290.50. That value should be at the account level as well since there is only one case. However, if there were two cases, I need it to sum up the revenue from both cases. Is this possible in the report? 

User-added image

Dan ErvinDan Ervin
Have you attempted to use the All summary levels option within the Custom Summary Formula Setup page? I believe this will sum the totals in a way that you are looking for.

User-added image