Rule Help

Post Reply
abhijit4569
Posts: 3
Joined: Fri Oct 18, 2013 6:04 am
OLAP Product: TM1
Version: 10.2
Excel Version: 10.2

Rule Help

Post by abhijit4569 »

Hello,
I am newbie to TM1 development. I have came across and issue that needs a solution.
untitled.JPG
untitled.JPG (109.79 KiB) Viewed 1747 times
As you can see.
I want to calculate for all Phases in dimension in the following way
For Phase-10001000
Spend-Overheads (Allocated HO by RO) = 50 (In percentage)
So,

Code: Select all


['Phase-10001000','Spend-Overheads (Allcoated) in Crs'] = ['Project-1000', 'Spend-Overheads (Allocated HO by RO)'] * ['Phase-10001000', 'Spend-Overheads (Allocated HO by RO)']  / 100;

i.e  4.1 * 50 / 100 = 2.05

How to make this code dynamic so that it will apply to all phases of all projects, instead me hardcoding each and every phase.
In future they may add new phases so the code should work without adding a new code to the rule.
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Rule Help

Post by tomok »

If your Project dimension is as clean as you show in the example, then all you need to do is replace the hard-coded reference to the parent of each phase and use the ELPAR function instead:

Code: Select all

['Spend-Overheads (Allcoated) in Crs'] = DB(CubeName,Dim1,Dim2,Dim3...ELPAR('Project',!Project),'Spend-Overheads (Allocated HO by RO)'] * ['Spend-Overheads (Allocated HO by RO)']  / 100;
You may need to tweak the code because I don't know the name of your cube nor the number of, or order of the dimensions in your cube but this is the general idea.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Post Reply