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

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 IIF function

Author  Topic 

hle4
Starting Member

3 Posts

Posted - 2011-03-24 : 14:36:27
I want to display the total for each week for four weeks. Here is an example, if week = 1 than display total for week 1, if week = 2 than display total for week 2, etc. I am looking for the right syntax for this case.

syedathariqbal
Starting Member

3 Posts

Posted - 2011-05-11 : 16:16:01
In the expressionstype this

=IIF(Fields!FieldName.Value =1,"Dothis_1",
IIF(Fields!FieldName.Value=2,"Dothis_2",nothing)
)


---"Nothing" is added in the second else part as you need to check only two conditions, if you have a third condition, that can be added there or a third nested IIF can be added.

Consultant
MSBI
Go to Top of Page
   

- Advertisement -