I have this MDX select statement that gives me the current year's data for the 'Sales Amount' and 'Customer Count' measures.
What I would like to have is additional columns with the previous year's data for the same measures.
I suspect I will need another select statement incorporating the 'prevMember' function, something like 'StrToMember(@pickTimeYear,CONSTRAINED).prevMember'.
I have been unsuccessful with adding another select statement to get the additional columns for the previous year's data.
Thanks in advance for any suggestions.
--Terry
___________________________________________________
SELECT
NON EMPTY (
{
[Measures].[SALES Amount],
[Measures].[Customer Count]
} ) ON COLUMNS ,
FILTER(StrToMember(@pickTimeYear,CONSTRAINED) * [Customers].[Market Segment Category].[Market Segment Category].ALLMEMBERS , [Measures].[SALES Amount] <> 0) ON ROWS
FROM [Sales Cube]
WHERE
(
STRTOMEMBER(@pickParentBranch),
STRTOMEMBER(@pickAccountNumber)
)