Hi,
1) I have Location and Product hierarchies such as:
Location: Corp->Div->Region->Dist->Loc
Product: Dept->Class->SubClass->Prod
2) Have two fact tables : fact1 and fact2, and columns are
fact1: Week, Div, Class, Amt [Lowest level of granularity]
fact2: Week, Div, Prod, Amt [Lowest level of granularity]
"Amt" across these two facts tables can't be correctly aggregated due to business rules. Hierachies can only allow the drill to happen upwards on these individual facts tables.
3) Need to build a report, where in the default attributes are "Corp", and "Dept", and a metric M1, which is defined as
"Depending on drill level on "Corp", and "Dept", display Sum(Amt) from either fact1 or fact2". Which means, for example,
if the attribute drill levels are (keeping the parent while drilling):
Corp and/or Div Dept and/or Class -> M1:Sum(Amt) from fact1
Div and/or SubClass and/or Prod -> M1:Sum(Amt) from fact2
Anything below on Div in the Loc hierarchy, irrespective of the drill level on the Product hierarchy, M1 metric should display "Blanks". It also means that the aggrgations can only be performed on either of the fact tables - For example, with "Div" as Location attribute level, if we want to rollup from "Prod" to "SubClass", we would use the "Amt" from fact2, BUT if we want to rollup from "Prod" to "Class", or "SubClass to Class", then, "Amt" from fact1 table would be used.
We can definitely put the decode/CASE logic, but, how would we know the current attribute drill level, which is the actual basis for hitting the fact1 or the fact2 tables. And, to me, it si the root cause behind all these calculations.
Can anyone help me oue here? It's very urent - any help/hints would greatly be appreciated.
Thanks
1) I have Location and Product hierarchies such as:
Location: Corp->Div->Region->Dist->Loc
Product: Dept->Class->SubClass->Prod
2) Have two fact tables : fact1 and fact2, and columns are
fact1: Week, Div, Class, Amt [Lowest level of granularity]
fact2: Week, Div, Prod, Amt [Lowest level of granularity]
"Amt" across these two facts tables can't be correctly aggregated due to business rules. Hierachies can only allow the drill to happen upwards on these individual facts tables.
3) Need to build a report, where in the default attributes are "Corp", and "Dept", and a metric M1, which is defined as
"Depending on drill level on "Corp", and "Dept", display Sum(Amt) from either fact1 or fact2". Which means, for example,
if the attribute drill levels are (keeping the parent while drilling):
Corp and/or Div Dept and/or Class -> M1:Sum(Amt) from fact1
Div and/or SubClass and/or Prod -> M1:Sum(Amt) from fact2
Anything below on Div in the Loc hierarchy, irrespective of the drill level on the Product hierarchy, M1 metric should display "Blanks". It also means that the aggrgations can only be performed on either of the fact tables - For example, with "Div" as Location attribute level, if we want to rollup from "Prod" to "SubClass", we would use the "Amt" from fact2, BUT if we want to rollup from "Prod" to "Class", or "SubClass to Class", then, "Amt" from fact1 table would be used.
We can definitely put the decode/CASE logic, but, how would we know the current attribute drill level, which is the actual basis for hitting the fact1 or the fact2 tables. And, to me, it si the root cause behind all these calculations.
Can anyone help me oue here? It's very urent - any help/hints would greatly be appreciated.
Thanks