I am having dificulty building a weighted average metric. Here are the details:
The report will display product (prod_key) and month (Mo_key).
Table A
ATTRIBUTES
Week_Key
Prod_key
Loc_key
FACTS
Service_Lvl
Return_Sls
Table B
ATTRIBUTES
Week_Key
Prod_key
Loc_key
FACTS
Reg_Sls
Metric Formula
The sales and returns come from different tables. Here is the definition:
A.Service_Lvl*(A.Return_Sls+B.RegSls) For Each A.Loc Key
Divided By
(A.Return_Sls+B.RegSls) Total Sum
I know that the numerator needs to have the loc_key in the SELECT clause but since it is not in the report, I can't figure out how to get it there. I tried dimensionality on loc_key with and without removing the reort level dimensionality but to no avail.
I would create a compound fact for A.Service_Lvl*(A.Return_Sls+b.RegSls) so that it would calculate at the lowest level, but since the Returns and Sales come from different tables, I cannot.
I would be most grateful for any help!
The report will display product (prod_key) and month (Mo_key).
Table A
ATTRIBUTES
Week_Key
Prod_key
Loc_key
FACTS
Service_Lvl
Return_Sls
Table B
ATTRIBUTES
Week_Key
Prod_key
Loc_key
FACTS
Reg_Sls
Metric Formula
The sales and returns come from different tables. Here is the definition:
A.Service_Lvl*(A.Return_Sls+B.RegSls) For Each A.Loc Key
Divided By
(A.Return_Sls+B.RegSls) Total Sum
I know that the numerator needs to have the loc_key in the SELECT clause but since it is not in the report, I can't figure out how to get it there. I tried dimensionality on loc_key with and without removing the reort level dimensionality but to no avail.
I would create a compound fact for A.Service_Lvl*(A.Return_Sls+b.RegSls) so that it would calculate at the lowest level, but since the Returns and Sales come from different tables, I cannot.
I would be most grateful for any help!