MDX - VISUALTOTALS and PARALLELPERIOD -
11-07-2006
, 11:59 AM
Hello,
I have a seemingly simple MDX statement that VISUALTOTALS fails on.
I want to calculate a 'Last Year' measure using PARALLELPERIOD.
I can create the measure OK and display it ON COLUMNS okay too.
The problem comes if I wrap VISUALTOTALS around it to form the "all" member
- it always give me a null for last year + all.
Sample MDX is shown below.
In the result set the column headed "All" + "CCMS Last Year" is always NULL
despite the fact that the individual last year members have values.
The column headed "All" + "CCMS This Year" has the correct value in it!
---------------------------------------
WITH
MEMBER [measures].[CCMS This Year] AS ([Measures].[Column Cms]),
NON_EMPTY_BEHAVIOR=[Measures].[Column Cms]
MEMBER [measures].[CCMS Last Year] AS ([measures].[Column Cms],
PARALLELPERIOD([Date].[Year_Quarter_Month_Week_Hierarchy].[Year],1,[Date].[Year_Quarter_Month_Week_Hierarchy].currentmember))
, FORMAT="#,0.00", NON_EMPTY_BEHAVIOR=[Measures].[Column Cms]
SELECT CROSSJOIN (
VISUALTOTALS({[Date].[Year_Quarter_Month_Week_Hierarchy].[All],
[Date].[Year_Quarter_Month_Week_Hierarchy].[Month].&[2006-01-01T00:00:00]:[Date].[Year_Quarter_Month_Week_Hierarchy].[Month].&[2006-02-01T00:00:00]}),
{[measures].[CCMS This Year], [measures].[CCMS Last Year]}
) ON COLUMNS
,NON EMPTY [Publication_Filter].[Filter Group].members ON ROWS
FROM b2b_cube
WHERE (<various slicer clauses>)
----------------------
Please help if you can
Thanks in advance
Mgale1 |