You are here:
PARENTGROUPVAL and PREVGROUPVAL
Use PARENTGROUPVAL to calculate values relative to a parent grouping. Use PREVGROUPVAL to calculate values relative
to a peer grouping.
PARENTGROUPVAL
Use this function to calculate values relative to a parent grouping.
PREVGROUPVAL
Use this function to calculate values relative to a peer grouping. If there's no previous grouping, the function returns a null value.
Example: Three Week Moving Average
To calculate a three-week moving average of opportunity amounts:
(OppProductTrends__c.Amount__c:SUM+ PREVGROUPVAL(OppProductTrends__c.Amount__c:SUM, OppProductTrends__c.as_of_date__c) + PREVGROUPVAL(OppProductTrends__c.Amount__c:SUM, OppProductTrends__c.as_of_date__c,2))/3
