Skip to Content
0
Former Member
Dec 04, 2008 at 08:41 PM

How do I create a 4 Quarter Rolling Total?

111 Views

I am new to Crystal Reports. I am trying to write code or use the running total function to create a new field that takes the current quarter's data and adds the values from the previous three quarters. For each record, the 4 quarter rolling total will be updated.

Fields: Quarter End Date

Plant name

EnergyUsage

I can determine the starting date to sum the energy usage

dateadd("q", -3, {Quarter End Date})

How do I total the energy usage for each quarterly record between the start date and the Quarter End date?