Parent function will return the associate parent member of the specified member. For instance, If you are a Amazon developer and If one of your customer is looking for iPod in Amazon.com. As a developer it is your duty to display all the Apple products at the bottom of the page so that user can browse other products and sometimes he may buy? In these situations you can use the parent function to find iPod parent by writing something like [Product].[Apple].[iPod].PARENT
MDX Parent Function Example
We have one customer in Customer Geography Hierarchy called [Antonio G. Patterson]. In this example we are going to find the [Internet Sales amount] of the all the customers who are living in the same postal code as [Antonio G. Patterson].
CODE
OUTPUT
ANALYSIS
Below statement will place the [Internet Sales Amount] in the columns region.
Below statement will find the parent (One level above) of [Antonio G. Patterson]. As per the Customer Geography Hierarchy Postal Code is the level above the Customers and [Antonio G. Patterson] lives in 2450 Postal Code.
So, below MDX query will calculate the total [Internet Sales Amount] against the Postal Code 2450.
Thank you for Visiting Our Blog