Current Day calculation in Days dimension

Post Reply
Dev1975
Posts: 9
Joined: Mon Dec 16, 2013 10:05 am
OLAP Product: TM1
Version: 10.2
Excel Version: 2010

Current Day calculation in Days dimension

Post by Dev1975 »

Hello everyone,

I'm trying to setup a dimension that lists all the days in the current tax year. What I want to add is a "flag" which marks the current day depending on what today's date is. Is there a way of setting this up during the creation of the dimension, or would I need to create the dimension first and then add some sort of rule/calculation afterwards?

Any advice would be greatly appreciated.

Many thanks,
Dev
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Current Day calculation in Days dimension

Post by rmackenzie »

Create a dimension called 'Day' and fill it with n-level elements in the format YYYY-MM-DD. Then create an attribute called 'IsCurrentDay'. Then write a rule on the attributes cube:

Code: Select all

['IsCurrentDay']=S:IF(!Day@=TODAY(1),'TRUE',STET);
Here is the doco on the TODAY function.
Robin Mackenzie
lotsaram
MVP
Posts: 3704
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Current Day calculation in Days dimension

Post by lotsaram »

Generally I have a consolidation called "Current Day" which is maintained overnight by TI. Pretty simple to set up.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Dev1975
Posts: 9
Joined: Mon Dec 16, 2013 10:05 am
OLAP Product: TM1
Version: 10.2
Excel Version: 2010

Re: Current Day calculation in Days dimension

Post by Dev1975 »

Thanks for the responses, much appreciated. I should mention that I'm using Performance Modeler to setup the dimension, so I've got the "Days" dimension setup successfully. If I right-click on the dimension, I get the option to "add a new attribute", which I then select and created "IsCurrentDay".

From this point, though, I'm not able to setup a calculation for this column. Is there a particular menu option I'm missing, or should I be using a different method?

TIA!
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: Current Day calculation in Days dimension

Post by rmackenzie »

Dev1975 wrote:From this point, though, I'm not able to setup a calculation for this column. Is there a particular menu option I'm missing, or should I be using a different method?

If PM doesn't let you set up a rule on an attribute then you may have to look at using Architect/ Perspectives. If that doesn't work for you, then consider using a TI to set the attribute, or per Lotsa's comment, use TI to set a consolidation that has a child that is the current day. Either of the TI methods are pretty simple and still leverage the TODAY function.
Robin Mackenzie
Post Reply