Solved

Access aggregate query show total for each possible result

Posted on 2012-04-05
2
373 Views
Last Modified: 2012-06-21
Hi! I'm trying to put together an aggregate query in Access. The purpose of the query is to count records in a table based on a criteria. However, I want the query to show the total records where a certain field is true, and the total where it is false. I want these to show up as two separate columns in the query. However, when I include both criteria and run the query, I get no results. How can I fix this?
screenshot
0
Comment
Question by:etech0
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
Dale Fye earned 500 total points
ID: 37811847
SELECT Copywriter, CatYear, Sum(IIF([Cat Recd] = True, 1, 0)) as [Yes], Sum(IIF([CatRecd] = False, 1, 0)) as [No]
FROM [CatWeb Work]
WHERE CatYear = 2013
GROUP BY CopyWriter, CatYear
0
 
LVL 10

Author Closing Comment

by:etech0
ID: 37812480
Thanks!
Quick and easy response.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question