I have an MDX query resulting this value
+-----------+----------+--------------+--------+----------------+------+ | | Sales Cumulative | Sales Ratio To Target | + +----------+--------------+--------+----------------+------- | | Town A | Town B | Town C | Town A | Town B | Town C | +-----------+----------+--------------+--------+----------------+------+ | Quarter 1 | 10 | 20 | 30 | ? | ? | ? | | Quarter 2 | 30 | 40 | 60 | ? | ? | ? | +-----------+----------+--------------+--------+----------------+------+
I dont really know how to calculate in MDX to get the sales ratio to target, To calculate the ratio is simply divided the sales cumulative (measure) with the each town target
My geography dimension look like this,
+----------+----+ | Dim_Geography | +---------------+ | Province | | District | | Town | | Target | +---------------+
Currently this is my mdx script for sales cumulative..
WITH
MEMBER [Measures].[SalesCumulative] AS
Sum
(
NULL : [Date].[Quarter].CurrentMember
,[Measures].[Sales]
)
SELECT
{[Measures].[SalesCumulative]}
*
Descendants
(
[Geografi].[District].[All],
,AFTER
) ON 0
,{Descendants([Date].[Quarter].[All],,AFTER)} ON 1
FROM [Cube];