Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Calculate Average Monthly Usage Post Reply Post New Topic
Author Message
Krazy Kasper
Newbie
Newbie
Avatar

Joined: 11 Jul 2007
Location: United States
Online Status: Offline
Posts: 23
Quote Krazy Kasper Replybullet Topic: Calculate Average Monthly Usage
     Posted: 28 Jan 2009 at 2:16pm

 

Using Crystal Reports 10 -

I need to use a “formula” to calculate "Average Monthly Usage" for the past 12 months.

 

My ODBC table.fields are:

{FootageSummarySerial.FiscalYear}

{FootageSummarySerial.FiscalMonth}

{FootageSummarySerial.ActualUsage}

 

 

My code so far is:

IF {FootageSummarySerial.FiscalYear} = 2008

AND {FootageSummarySerial.FiscalMonth} = 1

THEN

AVERAGE ({FootageSummarySerial.ActualUsage})

ELSE 0

 

I need to include Fiscal Years 2007, 2006, and 2005, and all 12 Fiscal Months into the calculation.

 

I apppreciate any help in completing this formula.

 

Krazy Kasper
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jan 2009 at 2:50pm
Create a group on the FYear
Create a Group on the FMonth
Drop actualusage onto details. (you can supress it if you don't want to show it.
insert a Summary of actualusage as an AVERAGE at Group2 (header or footer) for the average for each Fmonth
insert a Summary of actualusage as an AVERAGE at Group1 (header or footer) for the average for each Fyear
insert a Summary of actualusage as an AVERAGE at Report footer or header for the average for all Fyears


Edited by DBlank - 28 Jan 2009 at 2:51pm
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum