O'Reilly logo

Salesforce Lightning Reporting and Dashboards by Johan Yu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the PREVGROUPVAL() function in Summary report

Let's create a Summary report:

  1. Use the Opportunity report type.
  2. Group by Stage and Close Date (Group Dates by Calendar Month).
  3. Add the summary formula and name it Prev Month Won with this formula: PREVGROUPVAL(AMOUNT:SUM, CLOSE_DATE).
  4. In this exercise, I'll filter the report to show the only Opportunity for 2 months of Close Date; This is only for simplicity in order to reduce data in the report, see the following screenshot for details:
  1. Add the formula summary to the Summary report.
  2. Add the Amount field and summarize it with Sum. You would see something similar to this report:

Let's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required