Return to: Calculated Member Builder Function List
Returns one of two values determined by a logical test.
IIf(«Logical Expression», «Value Expression1», «Value Expression2»)
Returns «Value Expression1» if «Logical Expression» evaluates to TRUE, otherwise returns «Value Expression2».
«Value Expression1» and «Value Expression2» must evaluate to the same type, either numeric or string.
To string:
IIf(IsEmpty(Measures.CurrentMember), "Yes", "No")
Returns "Yes" if Measures.CurrentMember is an empty cell, "No" otherwise.
To number:
IIf(IsEmpty(Measures.CurrentMember), 0, 1)
Returns 0 if Measures.CurrentMember is an empty cell, 1 otherwise.