Dynamic Time Dimensions for Templates & Cubes

Post Reply
appleglaze28
Regular Participant
Posts: 269
Joined: Tue Apr 21, 2009 3:43 am
OLAP Product: Cognos TM1, Planning
Version: 9.1 SP3 9.4 MR1 FP1 9.5
Excel Version: 2003

Dynamic Time Dimensions for Templates & Cubes

Post by appleglaze28 »

I was wondering if there any tips you guys can share on like how to make templates in the Application folder or even the cube itself have its default view change the times diemsnion to the current date or if not the latest time dimension. For example like when I open the cube I want the value to reveal show would be today's date & year as well there is a cube whose data only loaded every 15th & 30th of the month. So how can I do this so users won't have to change the time dimension to the latest time dimension.
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Dynamic Time Dimensions for Templates & Cubes

Post by lotsaram »

Hi Applegaze,

Given the amount of time you have been working with TM1 and posting here I'm a little surprised you would ask this as it is not that difficult to do!
Here's one approach (there are many).

- Have a control cube with string measures for current year, current month, current date, etc.
- Populate the measures using the TimeSt rules function
- create a subset in each relevant time dimension current year, current month, current date. Populate the subset with an MDX expression referencing the control cube value and the StrToMember function. This will return a single element of the relevant date for the dimension
- use this subset in the title area for view that you want to automatically update to reflect the current date

There may be some extra work to do with attributes and aliases depending on the naming convention used in your time dimensions but in principle this will work very well with a minimum of fuss.

Another way to do it is to use the same subsets but as static not dynamic and refresh the subset members via a nightly chore. Often I use this approach as using dynamic subsets can have some performance and locking implications which are avoided by static subsets.
Post Reply