Hi to all.I try to explain my problem.I use SSAS 2008 R2 and i have a Multidimensional Cube called SALES.In this cube i have dimensions and measures.Now i try to simplify the design of it and explain what is my question...I have a dimension STORES wtih all stores of my companyI have a dimension CALENDAR with all time periods I have a dimension PRODUCT CATEGORY with 3 levels (Parent Child Dimension)1) Level 12) Level 23) Level 3I have a measure called SALES AMOUNT (It sum all sales amount) depending on a selection .I created a new calculated measure that we can call 'SALES AMOUNT CUSTOMED'This measure need to sum SALES AMOUNT depending on a selection of levels of PRODUCT CATEGORY dimension...and depending on that i need to subtract tha sales amount of a certain member of Dimension STORES.I post here the MDX Expression of SALES AMOUNT CUSTOMED' calculated measure[b]CASE LEFT([Product Category].[Product Category].CURRENTMEMBER.Name,1) WHEN 'E' THEN ([Measures].[SALES AMOUNT] - [Measures].[SALES AMOUNT ONLY STORE CO16]) WHEN 'M' THEN ([Measures].[SALES AMOUNT] - [Measures].[SALES AMOUNT ONLY STORE CO11]) WHEN 'X' THEN ([Measures].[SALES AMOUNT]) WHEN 'I' THEN ([Measures].[SALES AMOUNT]) WHEN 'A' THEN ([Measures].[SALES AMOUNT]) WHEN 'Z' THEN ([Measures].[SALES AMOUNT]) ELSE ([Measures].[SALES AMOUNT] - [Measures].[SALES AMOUNT ONLY STORE CO16] - [Measures].[SALES AMOUNT ONLY STORE CO11])END[/b][b]This measure works fine !!!![/b][b] BUT MY PROBLEM is when i browse my cube with Excel [/b](2010 or 2013 no differences)Excel [b]does not calculate GRAND TOTAL correctly about my SALES AMOUNT CUSTOMED' calculated measure[/b]Here is what happen...[b]PRODUCT CATEGORY ---- SALES AMOUNT ---- SALES AMOUNT CUSTOMEDLEVEL 1 - LEVEL 2 - LEVEL 3[/b]E EE EE04 100 90E EE EE05 200 100E EE EE06 300 200E EE EE07 400 300 ==== ====[b]TOTAL --E-- [/b]1000 690 [b](Sub Total is correct !!!)[/b]M MM MM01 10 9M MM MM03 70 60 ==== ====TOTAL --M-- 80 69 [b] (Sub Total is correct !!!)[/b]GRAND TOTAL 1080 [b]1080 [b](IT IS WRONG WHY !!!)[/[/b]b] (1000 + 80 correct) [b](Grand Total of Calculated Measure It should be 690 + 69 = 759 )[/b]Why Excel does that ???It seems it does error calculating wrong Total about only calculated measure ...How can i solve that problem ???With Excel or with a different MDX Expression ???????????Thanks in advance for your replies...Regards.ps. TO EXPLAIN better i could not to post my excel...
↧