Page 1 of 1

TM1 MDX - Current Date/Year

Posted: Sun May 03, 2009 7:32 am
by damientaylorcreata
Hi Guys,

I currently have a subset in my year dimension titled Current Year. However this subset is manually set to 2009. Is there away that I can do a MDX expression that makes the subset set to the current year dynamically.

I have looked some online articles relating to TM1 MDX, but I am unable to find a function similar to Now()? I believe that there is a year function, but you have to pass it a date, therefore I just need to find a way to pass it the current date.

Any help would be appreciated.

Re: TM1 MDX - Current Date/Year

Posted: Sun May 03, 2009 10:47 am
by lotsaram
Static subsets work fine for this purpose and are commonly used, ... don't forget you have TI in your arsenal!

All that is needed is to have a date dimension in yyyy-mm-dd format (or alias in this format), possibly also with attributes for current week, last week, next week, current month, last month, next month, current year, ... and run a TI nightly to set all your time based reporting subsets.

Re: TM1 MDX - Current Date/Year

Posted: Sun May 03, 2009 11:44 pm
by damientaylorcreata
Yes, I may just create a parameters cube and stick the current year in there. I just wasn't sure if this could be done via MDX expression. Thanks for you help.

Re: TM1 MDX - Current Date/Year

Posted: Mon May 04, 2009 10:29 am
by Martin Ryan
There is a TODAY() function in TI. If you set up a chore that runs daily, or on the first of the month or whatever, this chore could destroy and rebuild a static subset using the TODAY function to work out the appropriate information.

Martin