views:

41

answers:

1

In most cases, each level of a hierarchy within a dimension represents different concepts (i.e. country->region->city, year->month->day) and this is simple enough to use in a cube.

What I'm interested in are variable depth hierarchies which tend to consist of instances of the same concept, i.e. nodes in a computer network where the "depth" is the hop count from a specific point of observation.

I'm considering setting up an arbitrary list of synthetic levels (level 1 = 1 hop away, level 2 = 2 hops away etc.), but then I probably have to pad the shorter branches all the way down to the lowest levels, which doesn't seem like a very elegant solution.

I'm looking for comments, ideas, suggestions and best practices.

+2  A: 

Sounds like a parent-child hierarchy, implemented as a single dimension table where each record has a self-referencing key to its parent.

In MS Analysis Services, more details are here http://technet.microsoft.com/en-us/library/ms174846.aspx

Meff
@Meff I agree! +1
ajdams
You named it thank you. :) I feel a bit silly now as I've read about it already, but had forgotten about it in the meantime: http://mondrian.pentaho.org/documentation/schema.php#Parent_child_hierarchies
Tomislav Nakic-Alfirevic