Hi,
I have a cube like that:
Account Dimension vs Product Dimension
Sell Income | Quantity | Unit Price
Computers 210 7 30
Computer A 20 2 10
Computer B 100 5 20
Sell Income = Quantity * Unit Price
The cube always aggregate first and after it calculate, because of that the total get wrong, Sell Income of Computers give me $210 and the correct value is $120. I tried put that formula in the dimension custom roll up, in dimension unary operation, in a calculated member but always give me the wrong value.
The only solution is create a script command in the cube calculation like this:
Scope(leaves(account), leaves(product))
[Account].[Sell Income] = [Account].[Quantity] * [Account].[Unit Price];
End Scope;
But that way I have performance problem. Any ideia?
Regards,
Handerson
You could try adding a "Sell Income" Named Calculation to the fact table in the Data Source View (DSV), like:
Quantity * Unit Price
Then create a "Sell Income" measure, with "sum" aggregation function, on this new fact field.
No comments:
Post a Comment