O'Reilly logo

MDX with Microsoft SQL Server 2008 R2 Analysis Services: Cookbook by Tomislav Piasevoli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Detecting members on the same branch

So far we've covered cases when there is a need to isolate a single member in the hierarchy, be it a root member or any other member in the hierarchy. This recipe deals with detecting whether the ascendants or descendants of the current member are on a particular cascade or branch in that hierarchy.

Let's illustrate this with a few examples.

Suppose we want to analyze dates. There's a concept of the current date, but since that date is usually found in a multilevel user hierarchy, we can also talk about the current month, current quarter, current year, and so forth.

Another example is the regional customer hierarchy. There we can detect whether a particular customer is living in a particular city, or if that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required