Solved

Access - Totals Query  - Include Count for Blank Cells

Posted on 2009-04-02
8
455 Views
Last Modified: 2012-05-06
In the attached Excel workbook, please find an example of a Pivot Table that was created, where cells that were blank are still counted as a value (i.e. I want to know how many blank cells the column contained).

I would like to reproduce the Pivot Table results on the sheet "Summary Count" that is based off of the data on sheet "Pivot Empty Sample."

Thanks
Sample-Pivot-Empty.xls
0
Comment
Question by:tahirih
  • 5
  • 3
8 Comments
 
LVL 44

Expert Comment

by:GRayL
ID: 24053549
Having filled the blanks with ="", the cells are no longer blank - they are text.  Find an empty cell, A623 for example and in B623 type =IsText(A623) returns True.  Make sure you are counting the right thing.
0
 

Author Comment

by:tahirih
ID: 24053636
How can I implement this in an Access Query?

Thanks
0
 
LVL 44

Expert Comment

by:GRayL
ID: 24053713
You have imported the file into Access?  When you go to record 623, does FSC look empty?  If so run this query:

SELECT Count(FSC) FROM myTable WHERE FSC=""
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
LVL 44

Expert Comment

by:GRayL
ID: 24053737
I guess I have to ask - Why is this question in the Access Zone?
0
 

Author Comment

by:tahirih
ID: 24053800
Please review the Pivot Table results. I want to get a resulting Access table that looks just like this (without the Grand Total at the bottom).

Here are the steps I need to clarify:

1. The Excel table I did format, to be able to create the Pivot Table you see
2. Please assume that the Access table will not have any prior formatting to blank cells (the Excel table did not either - I included ="" to create the Pivot Table).
3. Similar to the ="", I would like to have a similar coding system in Acces

Therefore, I have placed the question in the Access zone. Hope this made sense.
0
 
LVL 44

Accepted Solution

by:
GRayL earned 500 total points
ID: 24054021
Import the Pivot Empty_Sample sheet using the Import wizard.  Then run this query:

SELECT fsc, Count(Nz(fsc,""))
FROM [Pivot Empty_Sample] GROUP BY fsc ORDER BY fsc;

0
 

Author Closing Comment

by:tahirih
ID: 31565929
Just what I have been looking for.

Thanks!
0
 
LVL 44

Expert Comment

by:GRayL
ID: 24054335
Thanks, glad to help.
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

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.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

733 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