I have a date dimension that includes attributes such as Date Key, Calendar Date, Same Date Next Year Date Key, etc.
This is a typical date dimension and is working beautifully. We have the Same Date Next Year Date Key because we need to know what today will be next year. For example today might be the nnth day of the year for us so we need to know what the nnth day of the year next year will be. We have already figured out our formula and simply populate the attribute via the dsv.
So if today is [Date].[Calendar Date].&[2013-09-16], then [Date].[Same Date Next Year Date Key].&[20140915]
Using this structure, I need to find the value of a measure for today and today's date LAST year.
SELECT [Measures].[Measure1] ON COLUMNS, [Date].[Calendar Date].[Calendar Date] ON ROWS FROM (SELECT [Date].[Calendar Month].&[2013]&[9] ON COLUMNS FROM [MyCube])
The code above gives me the measures for all dates in 9/2013. How do I get the LAST year's dates with this?
So my result set should look like:
DateMeasure1Last Year Date
Measure1 Last Year
2013-09-01102012-09-02
12
2013-09-02542012-09-03
49
I've tried so many things I've worked myself in circles (a common situation lately). Any and all help is appreciated!