Solved

Access - Totals Query  - Include Count for Blank Cells

Posted on 2009-04-02
8
453 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

809 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