SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Using IN on conditional formatting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sz1
Constraint Violating Yak Guru

United Kingdom
443 Posts

Posted - 02/26/2013 :  10:31:37  Show Profile  Reply with Quote
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
52317 Posts

Posted - 02/26/2013 :  23:20:18  Show Profile  Reply with Quote
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/

Go to Top of Page

sz1
Constraint Violating Yak Guru

United Kingdom
443 Posts

Posted - 02/27/2013 :  05:17:22  Show Profile  Reply with Quote
Agh ok thanks that will do it, just a bit long winded.

SZ1
Learning and development is the driving force in the universe...!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 02/27/2013 :  05:19:21  Show Profile  Reply with Quote
you're welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3712 Posts

Posted - 02/27/2013 :  07:56:42  Show Profile  Reply with Quote
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
Go to Top of Page

sz1
Constraint Violating Yak Guru

United Kingdom
443 Posts

Posted - 02/27/2013 :  09:48:51  Show Profile  Reply with Quote
Thanks

SZ1
Learning and development is the driving force in the universe...!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000