MDX Descendant Function

This example shows how to use Descendant function with Desc_Flag as self_before_after which means this will show all members at level - Subcategory_Category_Product. and to prove that we are getting correct result I am using Member Property - Level which shows Level Name to which Member Belongs

Member Measures.ProductStatus As [Product].[Status].Member_Key
Member Measures.Levela as [Product].[Product Categories]
SELECT descendants ([Product].[Product Categories].[Category].allmembers,[Product].[Product Categories].[Subcategory],self_before_after)
on 1 ,
{Measures.ProductStatus,Measures.Levela} on 0
FROM [Adventure Works]

Added a where clause just to show members with Product.Status as Current


Browsed Cube - To cross check whether I am getting correct result for Descendant Function


Comments (0)

Skip to main content