calculated control in access report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to sum a column based on criteria in another column. Can you help me
 
I need to sum a column based on criteria in another column. Can you help me

Not unless you care to give some more information, such as the field
names, the criteria, and where you wish to show the total.
 
jcp said:
I need to sum a column based on criteria in another column. Can you help me


Someone will probably be able to help, but not until you
explain more about "sum a column based on criteria in
another column"
 
My apologies, I have never posted like this. I have a report that has a
calculated control on it that says - =sum([Units]). It works, but I need to
expand it to say -
= sum ([units] if [Service code="0600","0800"]. The field names are Units
and Service code. The control in in the report footer.
Is this enough information?
 
jcp said:
My apologies, I have never posted like this. I have a report that has a
calculated control on it that says - =sum([Units]). It works, but I need to
expand it to say -
= sum ([units] if [Service code="0600","0800"]. The field names are Units
and Service code. The control in in the report footer.


Try writing it this way:

=Sum(IIf([Service code] IN ("0600","0800"), Units, 0)
 
That worked, thank you.

Marshall Barton said:
jcp said:
My apologies, I have never posted like this. I have a report that has a
calculated control on it that says - =sum([Units]). It works, but I need to
expand it to say -
= sum ([units] if [Service code="0600","0800"]. The field names are Units
and Service code. The control in in the report footer.


Try writing it this way:

=Sum(IIf([Service code] IN ("0600","0800"), Units, 0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top