Hi Everyone
I need a Calculated Measure which gives me the Total Sales of Products from AdventureWorks (Version AdventureWorksDW_SQL2008R2)
CREATE MEMBER CURRENTCUBE.[Measures].[ALLProductSales]
AS (
Root( [Product] )
,[Measures].[Sales Amount]
)
All The Filters are from Product Dimension. Stocking->Color and Product Categories. Date-> Calendar-> Date Calender on rows. CY 2005 and CY 2006 is filtered.
I choose Blue as a filter. I know that [Blue] dont have any sales in selected date.
The result is below. No problem here. The result is ok
Then i filter Product Category Clothing-> Tights -> Women s Tights, S (no sales again) and Select All for [Color]
The result is ok. No Problem again. Same result.
Now after that i change the Color to Blue again. Also there is no sales. But ALLProduct Sales must remain.
Oops nothing appears. But i was expecting to see the same result.
Now the question is How can i do that????
I wiil you this approach to calculated other business needs. This is just an example for query.
And also MDX test is below. Just try to comment out the lines an see my problem.
Thanks.
WITH MEMBER All_Product_Sales
AS
(Root( [Product] ),
[Measures].[Sales Amount]
)
SELECT
({[Measures].[Internet Sales Amount],All_Product_Sales }) ON COLUMNS,
({[Date].[Calendar].[Calendar Year].&[2006], [Date].[Calendar].[Calendar Year].&[2005]}) ON ROWS
FROM [Adventure Works]
WHERE
(
// [Product].[Color].&[Blue]
// ,[Product].[Product Categories].[Product].&[456]
)
cemuney