I am still new to MDX and I need some help with an mdx statement. What I need help on is how to write the MDX statement to get the result shown in senario #1 and senario #2. In senario #1, I am trying to get the total sales unit based on the filter criterias in my statement. In senario #2, I am try to get the count for number of week that has sales unit greather than zero or not empty and again using the same filter cirterias in my statement. Thanks in advance for any help you my provide. Here is the MDX statement I'm using
WITH
SET [WeekList] AS '{[Time].[Week].&[200529] : [Time].[Week].&[200530]}'
SET [CategoryList] AS '{[Category].&[6190],[Category].&[6191]}'
SET [StoreList] AS '{[Store].&[3],[Store].&[4],[Store].&[5]}'
SET [SetList] AS 'NonEmptyCrossJoin({[WeekList]},{[CategoryList]},{[StoreList]},{[Measures].[Sales Reg Units]}, 2)'
SELECT {[SetList]} ON COLUMNS,
{[StoreList]} ON ROWS
FROM [DayStoreCat_Analysis]
WHERE ([Measures].[Sales Reg Units])
Current Statement Result:
|200529 |200530
--------------------------------------------------------------------------------------------------
|Category 6190 |Category 6191 |Category 6190 |Category 6191
--------------------------------------------------------------------------------------------------
Store 3 |80 |14 |64 |16
Store 4 |27 | |34 |2
Store 5 |20 | |19 |14
Senario #1:
|200529 |200530
--------------------------------------------------------------------------------------------------
Store 3 |94 |80
Store 4 |27 |36
Store 5 |20 |33
Senario #2:
|#Week > 0
--------------------------------------------------------------------------------------------------
Store 3 |4
Store 4 |3
Store 5 |3
WITH
SET [WeekList] AS '{[Time].[Week].&[200529] : [Time].[Week].&[200530]}'
SET [CategoryList] AS '{[Category].&[6190],[Category].&[6191]}'
SET [StoreList] AS '{[Store].&[3],[Store].&[4],[Store].&[5]}'
SET [SetList] AS 'NonEmptyCrossJoin({[WeekList]},{[CategoryList]},{[StoreList]},{[Measures].[Sales Reg Units]}, 2)'
SELECT {[SetList]} ON COLUMNS,
{[StoreList]} ON ROWS
FROM [DayStoreCat_Analysis]
WHERE ([Measures].[Sales Reg Units])
Current Statement Result:
|200529 |200530
--------------------------------------------------------------------------------------------------
|Category 6190 |Category 6191 |Category 6190 |Category 6191
--------------------------------------------------------------------------------------------------
Store 3 |80 |14 |64 |16
Store 4 |27 | |34 |2
Store 5 |20 | |19 |14
Senario #1:
|200529 |200530
--------------------------------------------------------------------------------------------------
Store 3 |94 |80
Store 4 |27 |36
Store 5 |20 |33
Senario #2:
|#Week > 0
--------------------------------------------------------------------------------------------------
Store 3 |4
Store 4 |3
Store 5 |3