Returns one of two values determined by a logical test.
IIf(Logical_Expression, Expression1, Expression2)
A valid Multidimensional Expressions (MDX) logical expression that evaluates to true or false.
A valid Multidimensional Expressions (MDX) expression.
The expression specified by the logical expression evaluates to false only if the value of this expression is zero. Any other value evaluates to true.
If the specified logical expression evaluates to true, the IIf function returns the first expression. Otherwise, the function returns the second expression.
The specified expressions can return values or MDX objects. Furthermore, the specified expressions need not match in type.
The IIf function is not recommended for creating a set of members based on search criteria. Instead, use the Filter function to evaluate each member in a specified set against a logical expression and return a subset of members.
17 July 2006