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
jcp said:I need to sum a column based on criteria in another column. Can you help me
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.
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)