Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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)
 If IsNull
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sz1
Aged Yak Warrior

United Kingdom
555 Posts

Posted - 11/14/2012 :  09:15:45  Show Profile  Reply with Quote
Hi

I'm trying to add an expression for null values and want to return "No Assignee" if null else assignee field:

Can someone help please?


=IIF(Fields!Assignee_Details____Assignee_Name.Value Is Nothing, "", "No Assignee" Else Fields!Assignee_Details____Assignee_Name.Value

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 11/14/2012 :  09:18:38  Show Profile  Reply with Quote
You don't use an else clause in IIF. The second argument is the value returned if the first argument evaluates to true, and the third argument is returned if the first argument evaluates to false
=IIF
(
	Fields!Assignee_Details____Assignee_Name.Value Is Nothing,
	"No Assignee", 
	Fields!Assignee_Details____Assignee_Name.Value
)
Go to Top of Page

sz1
Aged Yak Warrior

United Kingdom
555 Posts

Posted - 11/14/2012 :  09:44:01  Show Profile  Reply with Quote
Thank you :)
Go to Top of Page

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 11/14/2012 :  10:00:02  Show Profile  Reply with Quote
Glad to help .)
Go to Top of Page
  Previous Topic Topic Next 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.11 seconds. Powered By: Snitz Forums 2000