Friday, 20 July 2012

Parent Child Hierarchies–Multiple Roll Ups

 

Is it possible to roll up a member to multiple ancestors in a parent child hierarchy?

I have the following two hierarchies in the same table:

Management hierarchy:

  • bob
    • jill
      • phil
      • pete

Sales hierarchy:

  • barbara
    • jenny
      • pete
      • pat

Modelled in the RPD

image

And shown in Answers

image

As can be seen, pete rolls up to two different ancestors: bob and barbara.

Using a standard OBIEE parent child hierarchy, however, the dipslay control only shows pete once when both hierarchies are shown.

image

If each individual hierarchy is shown, then pete appears under both.

image

Interestingly, the underlying SQL is rolling up pete twice correctly.

image

 

In conclusion, it appears that the front-end control does not like multiple roll ups.

The problem occurs even if you using a session variable to choose one of the underlying hierarchies.

Notes on parent child tables:

No join needed for map

2 comments:

  1. In other words, One child has 2 parents, I am also facing the same issue in which One child could have multiple parents as you have shown above.

    ReplyDelete
  2. The key is to have hierarchy id's and distinct member id's even if they belong to different hierarchies, this way you can join your parent-child map table by hierarchy_id and member_id.

    ReplyDelete