Calculate Average Monthly Usage in formula

krazykasper

Registered User.
Local time
Today, 11:23
Joined
Feb 6, 2007
Messages
35


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 (Bill) Kasper
 
Why not simply calculate the Average in the query?

depending on your backend, Avg or Average or something simular will simply do it in your query for you.
 

Users who are viewing this thread

Back
Top Bottom