Sum if

S

Supe

I have an existing report that gives me a monthly shipment total by having a
Month Footer give me a monthly total using Sum[InvQty]. The business manager
wants to add a column to this report that would have two columns, one for
current year and one for previous year. Report would like like below:

2006 2005
January 111 99
February 88 101
March 70 65

Is there an IIf function I can use in this Month Footer that would give me
the monthly totals by whatever year is listed in the Year field of the query?
Tried setting up IIf statements myself but keep getting an invalid syntax
error.
 
D

Duane Hookom

This depends somewhat on your report's record source fields and data. However
to sum the InvQty for records where a DateField is in the year 2005, use an
expression in a control source like:
=Sum(Abs(Year([DateField])=2005) * [InvQty])
 

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

Top