So I have a Date dimension and one of the members is the 4 digit year, eg 2012
Im still pretty new with MDX.
Im looking at an example using AdventureWorks 2008 DW. The following will get the value for 2008, but I want a list of values for ALL the year members.
WITH MEMBER Measures.ValueColumn as [Date].[Calendar].[July 1, 2008].MemberValue
MEMBER Measures.KeyColumn as [Date].[Calendar].[July 1, 2008].Member_Key
MEMBER Measures.NameColumn as [Date].[Calendar].[July 1, 2008].Member_Name
SELECT {Measures.ValueColumn, Measures.KeyColumn, Measures.NameColumn} ON 0
from [Adventure Works]
Results:
ValueColumn KeyColumn NameColumn
7/1/2008 20080701 July 1, 2008
What would I change to get a list of year values for the current year and previous 5 ?
This gives me a list of all the Calendar Year members in the Adventure Works cube
SELECT NULL ON COLUMNS,
[Date].[Calendar Year].MEMBERS ON ROWS
FROM [Adventure Works];
results:
All Periods
CY 2005
CY 2006
CY 2007
CY 2008
CY 2010
Those are the member names, but i want their values