question

LeoVerratti-4083 avatar image
0 Votes"
LeoVerratti-4083 asked ZoeHui-MSFT edited

How to use COUNT, IIF, & IS NOT NULL in a SSRS expression together?

Hi,

I'm looking to use an expression with 3 different statements. In SQL it would be a simple line like:
SELECT count(clientid)
FROM table1
WHERE col1 = "value1" and col2 = "value2" and col3 IS NOT NULL

This is what I have so far... I don't know where to put the IS NOT NULL statement

=COUNT(IIF(Fields!Column1.Value="True" AND Fields!Column.Value="True" ,1,Nothing))

sql-server-reporting-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ZoeHui-MSFT avatar image
0 Votes"
ZoeHui-MSFT answered ZoeHui-MSFT edited

Hi @LeoVerratti-4083,

You may refer below expression for a try:

 =sum(IIF(Fields!Column1.Value="True" and Fields!Column.Value="True"  and Fields!Column3.Value<>nothing ,1,Nothing))

If I misunderstand your need, please incorrect me.

Regards,
Zoe


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

What can I do if my transaction log is full?--- Hot issues November

How to convert Profiler trace into a SQL Server table -- Hot issues November






5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.