Creating hierarchy aggregation from 2 tables

  • Hi,

    I'm working on a solution to bering 2 tables together, then aggregate the totals from each node.

    table 1 is the structured hierarchy, simple parnet child structure.

    table 2 has all the totals in it, but also has other fields that alter the hierachy structure.

    This isn't a simple case of a parent child running total as the other fields come into play to create a whole new hierarchy, but this now comes with problems as it loses the strucutre and has lots of nulls.

    child parent code1 code2 total

    1 0 null null null

    2 1 1 1 1

    3 1 null null null

    4 2 1 1 1

    5 2 2 1 1

    6 2 2 2 1

    The above is an example of the data when you combine the 2 tables to get the new structure.

    This is so fiddly that I can't really explain it very well but hopefully someone can make it out form the table above. In essence, the new hierarchy is based of child, code1 and code2. But throughout the data structure it's littered with nulls and therefore loses it's structure repeatedly, making aggregation a problem.

    Thanks

    James

  • Scrap that. I figured out a really simple way of dealing with it.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply