Sum calculation based on other field value

  • Thread starter Thread starter Rita
  • Start date Start date
R

Rita

Hi,
On a report, I want the sum of a field based on criteria of another
field.

An example of the fields are:
a field called Salaries and a field called Position. The data in the
Position field states either "Manager" or "Clerk" and I need the salary sum
on the report for each position.

Something like =sum([salary] where emp = "manager") in a text box on the
report. Obviously this is
incorrect because it doesn't work. Any/all help is most appreciated.

Thanks.
 
Rita said:
On a report, I want the sum of a field based on criteria of another
field.

An example of the fields are:
a field called Salaries and a field called Position. The data in the
Position field states either "Manager" or "Clerk" and I need the salary sum
on the report for each position.

Something like =sum([salary] where emp = "manager") in a text box on the
report. Obviously this is
incorrect because it doesn't work. Any/all help is most appreciated.


What you asked for is a total of all manager salaries,
clerks, etc. This is not an appropriate thing to do as part
of a report's calculations.

Instead, you should create a subreport based on a totals
query that groups on the position field.
 
Thanks so much. That is actually so logical, I'm ashamed I didn't think of
it.
RT


Marshall Barton said:
Rita said:
On a report, I want the sum of a field based on criteria of another
field.

An example of the fields are:
a field called Salaries and a field called Position. The data in the
Position field states either "Manager" or "Clerk" and I need the salary
sum
on the report for each position.

Something like =sum([salary] where emp = "manager") in a text box on the
report. Obviously this is
incorrect because it doesn't work. Any/all help is most appreciated.


What you asked for is a total of all manager salaries,
clerks, etc. This is not an appropriate thing to do as part
of a report's calculations.

Instead, you should create a subreport based on a totals
query that groups on the position field.
 
Back
Top