Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Count Null Values

0 views
Skip to first unread message

C a r l o s - A n t o n i o

unread,
Aug 17, 2005, 4:15:54 PM8/17/05
to
Hi

How do I count Null and non null values in reporting services....????

Thanks

Carlos Antonio


Robert Bruckner [MSFT]

unread,
Aug 17, 2005, 9:46:09 PM8/17/05
to
This will count all rows where the value of the X-field is not null:
=Count(Fields!X.Value)

You may also want to check the CountDistinct(...) aggregate function.

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.


"C a r l o s - A n t o n i o" <carlvazpr?arrobażyahoo.com> wrote in message
news:eVqO6h2o...@tk2msftngp13.phx.gbl...

Lance

unread,
Aug 23, 2005, 1:17:23 PM8/23/05
to
You can also do counts via the SUM function with a nested IIF like
this:

// This counts NOT NULL values
=SUM(IIF(Fields!MyField.Value = Nothing, 1, 0))

// This counts NULL values
=SUM(IIF(Fields!MyField.Value = Nothing, 0, 1))

Lance
http://www.lance-hunt.net

Lance

unread,
Aug 23, 2005, 1:39:10 PM8/23/05
to
Sorry, my comments are backwards....

// This counts NULL values
=SUM(IIF(Fields!MyField.Value = Nothing, 1, 0))

// This counts NOT NULL values
=SUM(IIF(Fields!MyField.Value = Nothing, 0, 1))

0 new messages