MDX and Date Logic -
05-25-2005
, 01:11 PM
New to MDX, hoping someone can help.
I have a time dimension broken down like this:
[Time].[All Time].[2005].[May].[6]
What I want is to get the first day of each existing month for the
previous 12 months -- i.e. May 1 2004, June 1 2004,...,May 1 2005
Currently, I'm able to get what I need by hardcoding, however I know
there's got to be a better way:
{[Time].[May].FirstChild,[Time].[June].FirstChild, ... } on ROWS, ...
I have been exploring functions such as PeriodsToDate() and
LastPeriods(-12, x) but so far have been unable to come up with the
right combination.
What am I missing?
Thanks. |