all groups > sql server reporting services > august 2005 >
You're in the

sql server reporting services

group:

Count(IIF) not working


Count(IIF) not working SLB
8/3/2005 4:52:03 PM
sql server reporting services:
Hello, I have been fighting with getting the following statement to work

=Count(IIF( Fields!PDDAYS.Value>30,1,0))

I basically have returned all records to get a total count and need to weed
out those I want so I can divide the [totalofallrecords] by the
[totalofthose>30daysdue]

Any help would be appreciated.
Re: Count(IIF) not working Robert Bruckner [MSFT]
8/4/2005 9:51:52 AM
I suppose you really want the Sum() aggregate, rather than Count(). Count
works the same way as it works in SQL - every value different than NULL will
be counted.

Try this (inside a data region - e.g. in a table header/footer etc.):
=Sum(IIF( Fields!PDDAYS.Value>30,1,0))


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


[quoted text, click to view]

Re: Count(IIF) not working SLB
8/4/2005 10:08:04 AM
Thanks so much, worked like a charm. Don't know what I was thinking.

[quoted text, click to view]
AddThis Social Bookmark Button