| Author |
Topic  |
|
|
sz1
Constraint Violating Yak Guru
United Kingdom
294 Posts |
Posted - 02/26/2013 : 10:31:37
|
Hi
Is it possible to use an IN statement to add more numbers to the below?
=iif((Fields!SeventyFive_Percent.Value = 37800), "Green",(iif(Fields!Ninety_Percent.Value = 77760, "Green", iif( Fields!OneHundred_Percent.Value = 86400, "Red", ""))))
So using IN
=iif((Fields!SeventyFive_Percent.Value IN ("37800","37801"), "Green",(iif(Fields!Ninety_Percent.Value = 64800, "Green", iif( Fields!OneHundred_Percent.Value = 21600, "Red", ""))))
SZ1 Learning and development is the driving force in the universe...! |
Edited by - sz1 on 02/26/2013 10:47:11
|
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47099 Posts |
Posted - 02/26/2013 : 23:20:18
|
In is not supported inside SSRS. You've to write it by means of set of conditions separated by Or
=iif((Fields!SeventyFive_Percent.Value = "37800" Or Fields!SeventyFive_Percent.Value = "37801" , "Green",(iif(Fields!Ninety_Percent.Value = 64800, "Green", iif( Fields!OneHundred_Percent.Value = 21600, "Red", ""))))
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
sz1
Constraint Violating Yak Guru
United Kingdom
294 Posts |
Posted - 02/27/2013 : 05:17:22
|
Agh ok thanks that will do it, just a bit long winded.
SZ1 Learning and development is the driving force in the universe...! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47099 Posts |
Posted - 02/27/2013 : 05:19:21
|
you're welcome
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
|
James K
Flowing Fount of Yak Knowledge
1508 Posts |
Posted - 02/27/2013 : 07:56:42
|
| Another option, which is a bit more readable, especially if you have several colors that you want to pick from would be to use the SWITCH construct. A brief description and example is here: http://msdn.microsoft.com/en-us/library/ms157328.aspx |
 |
|
|
sz1
Constraint Violating Yak Guru
United Kingdom
294 Posts |
Posted - 02/27/2013 : 09:48:51
|
Thanks
SZ1 Learning and development is the driving force in the universe...! |
 |
|
| |
Topic  |
|