PREVGROUPVAL in Salesforce Reports

PREVGROUPVAL in Salesforce Reports

PREVGROUPVAL is a funtion used in custom summary formulas to return the value of a summary field from a previous grouping.

Example:

(AMOUNT:SUM +
PREVGROUPVAL(AMOUNT:SUM, CLOSE_DATE) +
PREVGROUPVAL(AMOUNT:SUM, CLOSE_DATE, 2) ) / 3 gives average closed Opportunities amount for 3 weeks.

AMOUNT:SUM – Gives current week sum.

PREVGROUPVAL(AMOUNT:SUM, CLOSE_DATE) – Gives previous week sum.

PREVGROUPVAL(AMOUNT:SUM, CLOSE_DATE, 2) – Gives 2 weeks before sum.

Leave a Reply