A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Counting Null Values in a Report



 
 
Thread Tools Display Modes
  #1  
Old January 14th, 2010, 09:23 PM posted to microsoft.public.access.reports
Dea
external usenet poster
 
Posts: 16
Default Counting Null Values in a Report

I have a report that is grouped by people, then by Reason Closed. I want to
count how many entries do not have a closed date. I tried the previous posts
but could not get it to work.

I have a group header for each person to group their categories together.

Thanks.
  #2  
Old January 14th, 2010, 09:55 PM posted to microsoft.public.access.reports
Clifford Bass via AccessMonster.com
external usenet poster
 
Posts: 150
Default Counting Null Values in a Report

Hi Dea,

Try:

=Sum(-IsNull([ClosedDateFieldName]))

Note the minus sign just after the first paranthesis. IsNull() returns
a -1 when the item is null, otherwise 0. So by summing up the negative of
each (-1)s you are in essence counting 1 for each null item. Alternatively
you could move the minus sign to the outside:

=-Sum(IsNull([ClosedDateFieldName]))

Clifford Bass

Dea wrote:
I have a report that is grouped by people, then by Reason Closed. I want to
count how many entries do not have a closed date. I tried the previous posts
but could not get it to work.

I have a group header for each person to group their categories together.

Thanks.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/201001/1

  #3  
Old January 14th, 2010, 09:57 PM posted to microsoft.public.access.reports
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Counting Null Values in a Report

Try this --
Sum(IIF([Reason Closed] Is Null, 1, 0)) AS Count_Null_Reason_Closed

--
Build a little, test a little.


"Dea" wrote:

I have a report that is grouped by people, then by Reason Closed. I want to
count how many entries do not have a closed date. I tried the previous posts
but could not get it to work.

I have a group header for each person to group their categories together.

Thanks.

  #4  
Old January 15th, 2010, 02:05 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default Counting Null Values in a Report

Control with following expression as its source should work

=Count(*)-Count([ClosedDate])

Count(*) counts every record
Count([ClosedDate]) counts all instances of closed Date that are NOT null.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Dea wrote:
I have a report that is grouped by people, then by Reason Closed. I want to
count how many entries do not have a closed date. I tried the previous posts
but could not get it to work.

I have a group header for each person to group their categories together.

Thanks.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.