Rule to write string from Consolidation to Leaf Element

Post Reply
User avatar
PavoGa
MVP
Posts: 618
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Charleston, Tennessee

Rule to write string from Consolidation to Leaf Element

Post by PavoGa »

TM1 How to do String rules to feed or populate leaf elements from a consolidation.

We have a control cube where we want to populate the level 1 consolidation with a string value and automatically have the underlying leaf elements populated with the string value of their respective parents.



In the example, I want the three CCs populated with "Same" for Apr, May & June.

Current rule:

Code: Select all

FEEDSTRINGS; 
['CtrlValue'] = S: IF(SUBST(DB('CtrlCube', !Region, 'CtrlValue'),1,4) @= 'Cost', 
DB('CtrlCube', 'Region' | subst(DB('ctrlCube',!Region, !ctrlDim) 11,3) , 'CtrlValue'), CONTINUE); 
I do not get any errors, just the leaf elements are not populated.

Thanks,
Ty
Cleveland, TN
declanr
MVP
Posts: 1815
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Rule to write string from Consolidation to Leaf Element

Post by declanr »

PavoGa wrote:TM1 How to do String rules to feed or populate leaf elements from a consolidation.

We have a control cube where we want to populate the level 1 consolidation with a string value and automatically have the underlying leaf elements populated with the string value of their respective parents.



In the example, I want the three CCs populated with "Same" for Apr, May & June.

Current rule:

Code: Select all

FEEDSTRINGS; 
['CtrlValue'] = S: IF(SUBST(DB('CtrlCube', !Region, 'CtrlValue'),1,4) @= 'Cost', 
DB('CtrlCube', 'Region' | subst(DB('ctrlCube',!Region, !ctrlDim) 11,3) , 'CtrlValue'), CONTINUE); 
I do not get any errors, just the leaf elements are not populated.

Thanks,


I have had a few beers tonight so I could be wrong but does your rule actually relate to the cubeview you've attached a picture of?...


Assuming from the image that "same_store" is the string element from your measures dimension you could go with:

Code: Select all

['same_store']=S:
If ( Ellev ( 'ty_test', !ty_test ) > 0, STET, DB( 'Cube', Elpar ( 'ty_test', !ty_test, 1), !Period, 'same_store') );
However I would use an ATTRS rather than an Elpar so that you don't have to worry about moving hierarchies etc.

HTH
Declan Rodger
Post Reply