Hi,
I have a query which returns revenues in a table such as-
Nov'05
------
Product1 Product2 RowTotal %(calculated as)
-------- -------- ======== =====
store1 20 30 50 (50/90)*100=55.56%; Here,denom is rowtotal for the
store2 10 25 35 (35/95)*100=36.84% store in Nov and Dec '05.
Total:85 (85/185)*100=45.95%
Another query-
Dec'05
------
Product1 Product2 RowTotal %of
-------- -------- ======== =====
store1 25 15 40 (40/90)*100 SIMILAR TO ABOVE
store2 40 20 60 (60/95)*100
Total:100
Yet another query-
Nov_and_Dec '05 (really, just a sum of the above 2)
---------------
Product1 Product2 RowTotal %of
-------- -------- ======== =====
store1 45 45 90 (90/185)*100=48.65% NOTE: here, denom is the GrandTotal
store2 50 45 95 (95/185)*100=51.35%
GrandTotal:185
My problem is computing the % in each of Nov'05; Dec '05; and in Nov_and_Dec '05.
1. In the Nov_and_Dec case, I used a variable GTotal with the formula to hold column sum. But to get the % in that case, when I use the formula:
=Percentage([Nov_and_Dec].[Revenue];GTotal)
The formula is in error. WHY? and how should I solve this?
2. In case of Nov'05 or Dec '05, How do I compute the % for each of the rows?
I have a query which returns revenues in a table such as-
Nov'05
------
Product1 Product2 RowTotal %(calculated as)
-------- -------- ======== =====
store1 20 30 50 (50/90)*100=55.56%; Here,denom is rowtotal for the
store2 10 25 35 (35/95)*100=36.84% store in Nov and Dec '05.
Total:85 (85/185)*100=45.95%
Another query-
Dec'05
------
Product1 Product2 RowTotal %of
-------- -------- ======== =====
store1 25 15 40 (40/90)*100 SIMILAR TO ABOVE
store2 40 20 60 (60/95)*100
Total:100
Yet another query-
Nov_and_Dec '05 (really, just a sum of the above 2)
---------------
Product1 Product2 RowTotal %of
-------- -------- ======== =====
store1 45 45 90 (90/185)*100=48.65% NOTE: here, denom is the GrandTotal
store2 50 45 95 (95/185)*100=51.35%
GrandTotal:185
My problem is computing the % in each of Nov'05; Dec '05; and in Nov_and_Dec '05.
1. In the Nov_and_Dec case, I used a variable GTotal with the formula to hold column sum. But to get the % in that case, when I use the formula:
=Percentage([Nov_and_Dec].[Revenue];GTotal)
The formula is in error. WHY? and how should I solve this?
2. In case of Nov'05 or Dec '05, How do I compute the % for each of the rows?