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

sql server reporting services

group:

SUM( IIF ....


SUM( IIF .... alison
9/19/2005 10:58:10 AM
sql server reporting services:
For a lot of my reports I use a "SUM(IIF" expression and it works like a charm.
ex. =SUM(IIF(Fields!clientType.Value=1,1,0))
Now I am running into a situation where I need to have two arguments in my
expression and then sum if both are true. Is this possible? It seems easy,
but for some reason I can't get the correct expression.
Example of what i need would be to sum if (clientType=1) AND (month=thisMonth)
Any help or hints would be so appreciated.

RE: SUM( IIF .... Exo Nimbus
9/19/2005 12:50:01 PM
You may want to use two cascaded IIF statements , something like this:
SUM(IIF(Fields!clientType.Value=1,IIF(month = thisMonth,1,0),0)). I have
successfuly used in the past many layered IIF statement and it has always
worked for me, just make sure you have all the possible combination covered,
also the syntax can get hairy at times :)
RE: SUM( IIF .... alison
9/20/2005 7:38:02 AM
Thank you. It worked great and will help a lot.

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