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!

Group totals

Status
Not open for further replies.

pspencer

MIS
May 31, 2001
18
US
I am creating a report for Human Resources that is
grouping by salary grade.

Grade 1
Location Dept Active Name Salary
AMC 6601 T J Doe 200.00
AMC 6602 J Smith 400.00
Average Annual Salary:xxxxx.xx

We are reporting on everyone who has been
employeed for the last five years. They want a group average annual
salary, but anyone who no longer works for the company (they are coded
with a T) is to be excluded in the group average annual salary total. Can
anyone point me the the right direction on how to create this?

Thanks in advance for any help.
Trice
 
Create a formula :

@AverageSalary
If {table.active} = T then 0 else {table.salary}

Place this in the detail, then right click, insert, summary average. You can now delete the formula from the detail.

Hope this helps.

Reebo
Scotland (Sunny with a Smile)
 
I've tried this and it works to a point. It create a subtotal but when it does the average it divides by the original number of employees instead of only the number of active employees.

In one group there are 16 employees but only 4 active employees. I need to come up with the average for those 4 actives but still list all of the employees.

Is there a way to do that?

Thanks for your help.
Trice
 
Try a running total average, using the running total editor:

Select {table.salary}, average, evaluate based on a formula:

{table.active} <> &quot;T&quot;

Reset on change of your group 1 (Grade}.

-LB
 
You can create another formula :
If {table.active} = T then 0 else 1

Do a sum of this field as well, then use this as your number of employees count.

Personally I stay clear of Crystal's running totals, and if I have to use running totals I create them myself....

Reebo
Scotland (Sunny with a Smile)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top