-
Want to Perform the Sum of a Field if another Field is Yes/N0
I am creating a report from 1 query that comes from 1 table. The report is grouped by "Cost Code". I am trying to publish 2 sums in each "Cost Code" footer. I want to sum the total of a field called "TOT of REQ" that only has a "Yes" (checked box) in another field called "Funded". Then, I want to sum the total for the "No" (unchecked box). I would will have the sums in groups by Cost Code and a final total at the end of the report. I have a Cost Code footer that sums the total of all the "TOT of REQ", but need to break it down to yes/no fields.
I have looked to use either IIF or sum expression, however, it has been a few years since I have done this sort of work.
Something close to what I am looking for:
COST Code
Item TOT of REQ Funded
Bed $1,452.00 Yes (Checked Box)
Window $3,000.00 No (Unchecked)
Door $200.00 Yes
Total of Funded: $1,652.00
Total of Unfunded $3,000.00
Any help would be great.
Patrick
Last edited by pjd71; 04-02-2013 at 07:37 PM.
Reason: Hit enter key and submitted
-
Try this type of thing:
=Sum(IIf(Funded = True, [TOT of REQ], 0))
I deleted your other 2 threads on the same topic.
-
Thank you, I used this, which I believe is the same. Definitely coming back to this site for help and possibly help others.
Thanks
Patrick D.
-
No problem, and welcome to the site by the way!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules