I am trying to create a month-over-month quantity difference report, but when I enter something like the following:

PREVGROUPVAL(Quantity__c:SUM, Report_Date__c)

I get the following error:

You must select a grouping context to use any report summary function

I've tried various iterations of summary fields and grouping fields and can't get it to work using any data. Thoughts?

2 Answers 2


If you are doing this in lightning, I suggest editing the report in Classic. For the PREVGROUPVAL function you need to choose a grouping level, which it seems like you can't do in Lightning.

  • That was it, thanks. I've spent so much time trying to get everybody out of Classic I forget that sometimes you have to go back.
    – Paugh
    Feb 25, 2020 at 15:07

Actually, you can select the grouping in lightening version. Go to 'Display' tab first and choose the specific grouping. After, proceed with the prevgroupval formula.enter image description here

  • I tried to do this in Lightning using your answer, but I could not get it to work. Then I switched to Classic and got it working pretty quickly. Went back to Lightning to see what the result looked like overthere. And there the formula and settings are exactly as I had tried them the first time in Lightning, only then it was rejected (same problem as OP). Strange... Oct 19, 2020 at 11:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .