Thursday, March 22, 2012

Easy ....If Else

I completely forgot how to do this. I want one of my groups in the matrix to take its week number (1-7) as Monday-Sunday.

so it would kind of be like this:

=IIF(Fields!DayOfWeek.Value=2,"Mon",

ELSE(Fields!DayOfWeek.Value=3,"Tues",

Else(Fields!DayOfWeek.Value=4,"Wed",

etc etc

Am i doing this right, or am i off?

I think you are almost right, but is RS you must use it like this :

=IIF(Fields!DayOfWeek.Value=2,"Mon",

iif(Fields!DayOfWeek.Value=3,"Tues",

iif(Fields!DayOfWeek.Value=4,"Wed", "other")))

Hope this helps

Vinnie

|||You could use the Switch function i.e =Switch(Fields!DayOfWeek.Value=2,"Mon", Fields!DayOfWeek.Value=3,"Tues"... and so on|||thanks for the help, I should have known the "(" didnt close till the end .sql

No comments:

Post a Comment