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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 10 YTD AVG calculated from MTD AVGs 1

Status
Not open for further replies.

SPBarran

MIS
Jun 21, 2005
7
US
I have YTD total, but cannot seem to get YTD avg from the MTD avgs. Groupings: Month>Supervisor>Employee
Purpose of report is to show 1. Employee total $'s submitted for charges, 2. The supervisor's total $'s & Avg for all their employees and 3. Overall company total/avg per emp.
The average for each month is calculated from total $ divided by number of employees (by Supervisor). Example:

SHOULD BE...
YTD Total:$1480
YTD Employee Average Total Charges Submitted:$296 (1480/5)
January
Superv Bob Tot:$400 EmpAvgTot:$200 (2 empl)
Empl Sue Total:$150
Empl Jim Total:$250
February
Superv Bob Tot:$1080 EmpAvgTot:$360 (3 empl)
Empl Sue Total:$425
Empl Jim Total:$350
Empl Joe Total:$305

I understand that you cannot summarize on a summary field. Is there another way around this? Maybe through a formula?
Any ideas?
 
Further clarification...

From the example above, I'm trying to get the following to show up:

YTD Employee Average Total Charges Submitted:$296 (1480/5)

This is with Crystal 10, Oracale 9i

 
Create a formula which concatenates the three group fields {@concat}:

totext(month({table.date}))+totext(year({table.date})) + {table.supervisor}+{table.employee}

Then create a formula:

sum({table.charges})/distinctcount({@concat})

You could probably use crosstabs for other calculations.

-LB



 
That's amazing! I fought with that formula all day yesterday. It never crossed my mind to concatenate. Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top