In an OLAP database I work with there is a 'Location' hierarchy consisting of the levels Company, Region, Area, Site, Room, Till. For a particular company I need to write some MDX that lists all regions, areas and sites (but not any levels below Site). Currently I am achieving this with the following MDX
HIERARCHIZE({
[Location].[Test Company],
Descendants([Location].[Test Company], [Location].[Region]),
Descendants([Location].[Test Company], [Location].[Area]),
Descendants([Location].[Test Company], [Location].[Site])
})
Because my knowledge of MDX is limited, I was wondering if there was a simpler way to do this, with a single command rather that four? Is there a less verbose way of achieveing this, or is my example the only real way of achieving this?