Showing posts with label conditional. Show all posts
Showing posts with label conditional. Show all posts

Wednesday, March 21, 2012

is this basic syntax correct?

Hi all,
I am trying to perform what would seem to be a very simple conditional check
but it never works!
I always end up with an empty value.
=SUM(IIF(Fields!Ticket.Value = 'Student', Fields!Quantity.Value =0,
Fields!Quantity.Value))
What I am hoping for in the result is that if there is a 'Student' in the
result set, when totalling, it should set that Quantity value to 0, but
continue to sum up the other values.
Any help appreciated.
ImmyTry
=SUM(IIF(Fields!Ticket.Value = "Student", 0,
Fields!Quantity.Value))
or
create a calculated field with
=IIF(Fields!Ticket.Value = "Student", 0,
Fields!Quantity.Value) as the expression and then sum the calculated
field.
Enter make sure to use double quotes SQLRS is real picky.

Monday, February 20, 2012

Is there an IN( ) function?

Is there and IN or and InList function in Reporting services? I'm trying to do some conditional formatting and it would be really handy to be able to write an expression such as =iif(Fields!blah.Value In(X,Y,Z),"Red","White")

Hi,

There is no IN function. I have been using OR functions for this

|||

Hi,

If your using RS 2005 then there is an IN function in Report Builder, just not in BIDS. I've used nested if statements to get around this problem when designing reports.

Cheers.

Dan.