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)
 If IsNull
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sz1
Constraint Violating Yak Guru

United Kingdom
457 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
Constraint Violating Yak Guru

United Kingdom
457 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  
 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.05 seconds. Powered By: Snitz Forums 2000