Hi,
I'm trying to find a way to keep a calculation on a detailed grain and once it's done on this level then aggregate it (SUM) the rest of the way to the top.
The formula is basically a X*Y (different grains though) and this works fine on the lowest level - so far so good.
Now I want to sum these results (eg. a total for all customers) and this results in 0 because the Y on this level is 0 - makes sense to me. Hence I want to CALCULATE (on product and customer level) first then AGGREGATE the calculated result in stead of "just" calculating it on Customer.
My table looks something like this:
Calculation (X and Y Values are Measures) | |||||
Customer | Product | Y Value | X Value | Current Result | Desired Result |
1 | 1 | 10 | 1 | 10 | 10 |
2 | 1 | 20 | 2 | 40 | 40 |
3 | 1 | -30 | 3 | -90 | -90 |
1 | 2 | 5 | 4 | 20 | 20 |
2 | 2 | 10 | 5 | 50 | 50 |
3 | 2 | -15 | 6 | -90 | -90 |
1 | 3 | -15 | 7 | -105 | -105 |
2 | 3 | -30 | 8 | -240 | -240 |
3 | 3 | 45 | 9 | 405 | 405 |
Aggregations | |||||
Customer | Product | Y Value | X Value | Current Result | Desired Result |
1 | 0 | 12 | 0 | -75 | |
2 | 0 | 15 | 0 | -150 | |
3 | 0 | 18 | 0 | 225 | |
1 | 0 | 6 | 0 | -40 | |
2 | 0 | 15 | 0 | -20 | |
3 | 0 | 24 | 0 | 60 |
I've tried to use this formula:
SUMX(
SUMMARIZE(
Customer;
Product);
X*Y)
This results in 0 in all levels (both higher and lower grain).
I can find plenty resources explaining how I aggregate then calculate - but not calculate then aggregate.
Hope anyone can help out - it will be greatly appreciated.
Kind regards,
J.