Hello Fabs -
I think you have created the best solution possible given your source data structure. It seems your only other option would be to pre-calculate Unita in the relational source (leaf level) and load this value as the fact. From there, the Sum aggregation would give you the proper parent values.
While this may be a better performer at query time, it makes your relational source logic more complicated and slower.
Scot J Reagin
sreagin@aspirity.com
Scot J Reagin
sreagin@hitachiconsulting.com