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.
TM1 MDX - Current Date/Year
- damientaylorcreata
- Posts: 86
- Joined: Mon Apr 13, 2009 8:47 am
- OLAP Product: Cognos TM1
- Version: 9.4
- Excel Version: 2003 and 2007
- Location: Sydney, Australia
- Contact:
TM1 MDX - Current Date/Year
Damien Taylor
-
- MVP
- Posts: 3698
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: TM1 MDX - Current Date/Year
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.
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.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
- damientaylorcreata
- Posts: 86
- Joined: Mon Apr 13, 2009 8:47 am
- OLAP Product: Cognos TM1
- Version: 9.4
- Excel Version: 2003 and 2007
- Location: Sydney, Australia
- Contact:
Re: TM1 MDX - Current Date/Year
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.
Damien Taylor
- Martin Ryan
- Site Admin
- Posts: 1989
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: TM1 MDX - Current Date/Year
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
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer