Social Icons

Tuesday, October 22, 2013

Where is @ISIDESC (Boolean Function) in ASO for MDX Formulas?

It has come out of surprise that ASO doesn't have a Boolean function similar to @ISIDESC function in BSO for writing MDX formulas. But, how can I achieve it? There are two different ways of doing it.
  1. Using ISANCESTOR Function
  2. Using CONTAINS function with a combination of Descendants function

[1] Using ISANCESTOR Function [ IsAncestor (Member1, Member2) ]

As the name says, this function will check if Member1 is ancestor of Member2. Let's take a simple example

IsAncestor ([Market].CurrentMember, [Florida])  This will check if the CurrentMember in the retrieve is Ancestor for [Florida].

Now, If we switch the member1, member2 we will be able to achieve the @ISDESC functionality.

IsAncestor ([Florida], [Market].CurrentMember) - This will check if [Florida] is ancestor of your CurrentMember and this condition will satisfy for all the members that fall under [Florida].

Using CONTAINS function with a combination of Descendants Function [ CONTAINS (Member_or_Tuple, Set) ]

Contains function will check if the Member_or_Tuple is present in Set.Below example will compute or check for Descendants

CONTAINS ([Market].CurrentMember, {Descendants([Florida])})

Hope this will help when you want to check for the Descendants in Boolean functions like CASE and IIF

Happy Learning!!!


2 comments: