Sunday, February 19, 2012

IIF Count

Cannot get this to work, any suggestions? (Need to count where values
are as below)
=Count(iif(LCase(Fields!Exceptions.Value Like) "*center*" AND
(LCase(Fields!Server.Value) Like "ser*" AND Fields!Production.Value = "1", 1, Nothing)))Bracket in wrong place?
Should be:
=Count(iif((LCase(Fields!Exceptions.Value)) Like "*center*" AND
(LCase(Fields!Server.Value)) Like "ser*" AND Fields!Production.Value ="1"), 1, Nothing))
Craig
"d4" <d4mann@.gmail.com> wrote in message
news:1141939610.708232.138940@.j33g2000cwa.googlegroups.com...
> Cannot get this to work, any suggestions? (Need to count where values
> are as below)
>
> =Count(iif(LCase(Fields!Exceptions.Value Like) "*center*" AND
> (LCase(Fields!Server.Value) Like "ser*" AND Fields!Production.Value => "1", 1, Nothing)))
>|||Get build errors:
The value expression for the textbox 'textbox25' has a scope
parameter that is not valid for an aggregate function. The scope
parameter must be set to a string constant that is equal to either the
name of a containing group, the name of a containing data region, or
the name of a data set.
and
The value expression for the textbox 'textbox25' uses an aggregate
expression with an invalid recursive/simple flag. The valid values for
this flag are 'Recursive' and 'Simple'.
Below does work, but I need to add another AND value to further select
correct one...
=Count(iif(LCase( Fields!Exceptions.Value ) Like "*center*" AND
Fields!Production.Value = "1", 1, Nothing))|||Got it:
=Count(iif(LCase(Fields!Exceptions.Value) Like "*center*" AND
LCase(Fields!Server.Value) Like "ser*" AND Fields!Production.Value ="1"), 1, Nothing))
Now, does anyone know how to do a NOT LIKE?|||put a NOT in front ... IIF(NOT (condition),truepart,falsepart)
"d4" wrote:
> Got it:
> =Count(iif(LCase(Fields!Exceptions.Value) Like "*center*" AND
> LCase(Fields!Server.Value) Like "ser*" AND Fields!Production.Value => "1"), 1, Nothing))
> Now, does anyone know how to do a NOT LIKE?
>

No comments:

Post a Comment