Hi everyone,
Can someone please assist me with creating averages in Crystal Reports 8.5? I've posted here a couple of times and I find it helps when I provide examples when dealing with the issues I present. So here it goes:
I have a very basic report containing an employee's Social Security number, Name, hire date, and hourly training wage. There are no groupings and no sorts. It's just a standard list of what's in the database's table. Basically, this is how it looks like after Crystal has finished reading the records:
SS#/Name/Hire Date/Hr Training Wage
111-11-1111/Katie Couric/01-01-2002/$30.00
222-22-2222/Matt Lauer/02-01-2002/$25.00
111-55-5555/Barbara Walters/04-01-2002/$0.00
999-33-3333/Al Roker/03-01-2002/$18.00
555-99-9999/Ann Curry/08-01-2002/$17.00
This is what I would like to do: I would like to calculate the average of the hourly training wages BUT, the calculation should only include wages greater than $0.00. ALSO, I want only those employees hired before a certain date.
So for example, I want to take an average of the hourly training wages for employees hired on or before 07-01-2002 with a wage greater than $0.00. From the sample data above, these are the records that should be included in the average calculation:
111-11-1111/Katie Couric/01-01-2002/$30.00
222-22-2222/Matt Lauer/02-01-2002/$25.00
999-33-3333/Al Roker/03-01-2002/$18.00
The average should be $24.33.
That's why I created a formula field that labeled each employee record as being "True" if they met this criteria and "False" if it didn't. Now:
SS#/Name/Hire Date/Hr Training Wage/Average
111-11-1111/Katie Couric/01-01-2002/$30.00/True
222-22-2222/Matt Lauer/02-01-2002/$25.00/True
111-55-5555/Barbara Walters/04-01-2002/$0.00/False
999-33-3333/Al Roker/03-01-2002/$18.00/True
555-99-9999/Ann Curry/08-01-2002/$17.00/False
I thought this would help make things easier and I could create an average formula that took the hourly training wages for only those records that had True in the "Average" column. But I haven't been successful.
Any assistance would be greatly appreciated!
Can someone please assist me with creating averages in Crystal Reports 8.5? I've posted here a couple of times and I find it helps when I provide examples when dealing with the issues I present. So here it goes:
I have a very basic report containing an employee's Social Security number, Name, hire date, and hourly training wage. There are no groupings and no sorts. It's just a standard list of what's in the database's table. Basically, this is how it looks like after Crystal has finished reading the records:
SS#/Name/Hire Date/Hr Training Wage
111-11-1111/Katie Couric/01-01-2002/$30.00
222-22-2222/Matt Lauer/02-01-2002/$25.00
111-55-5555/Barbara Walters/04-01-2002/$0.00
999-33-3333/Al Roker/03-01-2002/$18.00
555-99-9999/Ann Curry/08-01-2002/$17.00
This is what I would like to do: I would like to calculate the average of the hourly training wages BUT, the calculation should only include wages greater than $0.00. ALSO, I want only those employees hired before a certain date.
So for example, I want to take an average of the hourly training wages for employees hired on or before 07-01-2002 with a wage greater than $0.00. From the sample data above, these are the records that should be included in the average calculation:
111-11-1111/Katie Couric/01-01-2002/$30.00
222-22-2222/Matt Lauer/02-01-2002/$25.00
999-33-3333/Al Roker/03-01-2002/$18.00
The average should be $24.33.
That's why I created a formula field that labeled each employee record as being "True" if they met this criteria and "False" if it didn't. Now:
SS#/Name/Hire Date/Hr Training Wage/Average
111-11-1111/Katie Couric/01-01-2002/$30.00/True
222-22-2222/Matt Lauer/02-01-2002/$25.00/True
111-55-5555/Barbara Walters/04-01-2002/$0.00/False
999-33-3333/Al Roker/03-01-2002/$18.00/True
555-99-9999/Ann Curry/08-01-2002/$17.00/False
I thought this would help make things easier and I could create an average formula that took the hourly training wages for only those records that had True in the "Average" column. But I haven't been successful.
Any assistance would be greatly appreciated!