Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Range

Status
Not open for further replies.

khshankar

Programmer
May 13, 2003
89
US
I am using CR 8.5 and Oracle

I need to find the average of the last 5 weeks by
day. For example, to determine Monday's volume forecast, I want to take an average of the last 5 Mondays. Is this possible in Crystal if so what formula I have to use.


Thanks
 
Try:

//{@Monday}:
if dayofweek({table.date}) = 2 then {table.forecast}

Then create a second formula:

sum({@Monday},{table.group})/5

If you are not doing this at a group level, then remove the group condition.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top