Year to Month Mapping

Post Reply
David
Posts: 17
Joined: Mon Oct 19, 2009 8:45 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

Year to Month Mapping

Post by David »

Hi All,

I am trying to create a rule to transfer the yearly rate from one cube into another cube where the timescale dimension is month in mmm-yy format. Right now, I have to hardcode the month and I am hoping there is an easy way to achieve these by a lookup or something.

Code: Select all

[{'Jan-10','Feb-10','Mar-10','Apr-10','May-10','Jun-10','Jul-10','Aug-10','Sep-10','Oct-10','Nov-10','Dec-10'},'G&A Rate']=N:DB('_Burden Rates','2010','G&A');
[{'Jan-11','Feb-11','Mar-11','Apr-11','May-11','Jun-11','Jul-11','Aug-11','Sep-11','Oct-11','Nov-11','Dec-11'},'G&A Rate']=N:DB('_Burden Rates','2011','G&A');
The timescale dimension has an attribue named Year where identify the year for the month.

Thanks,

David
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Year to Month Mapping

Post by David Usherwood »

Not Y3K compliant :) but
['G&A Rate']=N:
DB('_Burden Rates',
'20' | subst(!Month,5,2),
'G&A')
;
Would work.
Better way would be to put a year attribute on the Month dimension and use that.
David
Posts: 17
Joined: Mon Oct 19, 2009 8:45 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

Re: Year to Month Mapping

Post by David »

Dave thank you! It works. BTW, I do have a year attribute on the Month dimension, but not kind sure how to make it work. Do you mind putting the code for me using the attribute? Thanks again.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Year to Month Mapping

Post by David Usherwood »

Think

['G&A Rate']=N:
DB('_Burden Rates',
attrs('Month',!Month,'Year'),
'G&A')
;

Would be about right.
Post Reply