TI Process to spread data at consolidation Level

Post Reply
dharav
Regular Participant
Posts: 193
Joined: Wed Apr 02, 2014 6:43 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010

TI Process to spread data at consolidation Level

Post by dharav »

Hello All

We have two cubes. A and B. Cube A is the input cube at leaf level. Now, we have to give Action Button to user to run TI to spread the data from respective consolidation element in Cube B.

Suppose, I have Source View in Cube A called 'Thriller

#########PROLOG################

PHierarchy='NNJ00101 - New Jersey Metro';
Vsrccube='A';
Vtgtcube='B';
Vsrcview='Thriller';
Vtgt='Expandable';


If(viewexists(Vtgtcube,vtgt)=1);
viewdestroy(vtgtcube,vtgt);
Endif;

Viewcreate(Vtgtcube,Vtgt);


Subsetcreate ('Hierarchy', 'Transformer2');
SubsetElementInsert ('Hierarchy', 'Transformer2','NJ Metro', 1);




Viewsubsetassign (Vsrccube,Vsrcview,'Metro Hierarchy', 'Transformer'); ####Transformer has leaf level element 'NJ Metro'
Viewsubsetassign (Vsrccube,Vsrcview,'forecastcalculations','Manual Forecast');
Viewsubsetassign (Vsrccube,Vsrcview,'accounts','All Members');
Viewsubsetassign (Vsrccube,Vsrcview,'Months','Months');
################################################################
Viewsubsetassign(Vtgtcube,Vtgt,'Hierarchy', 'Transformer2'); ######Transformer 2 has consolidated element 'NJ Metro'
Viewsubsetassign(Vtgtcube,Vtgt,'forecastcalculations','Manual Forecast');
Viewsubsetassign(Vtgtcube,Vtgt,'accounts','All Members');
Viewsubsetassign(Vtgtcube,Vtgt,'Months','Months');

#### Zero Out the view ####

Viewzeroout(Vtgtcube,Vtgt);

Data:

IF(CELLISUPDATEABLE (Vtgtcube,'NJ Metro', V2,V3,V4)=1);
CellPutProportionalSpread(NValue,Vtgtcube,'NJ Metro',V2, V3,V4);
ENDIF;

Epilog:

Viewdestroy ();
Subsetdestroy ();


I wrote above process but couldn't able to get success. Process goes successfully but data is not there. I put 1 for n level element to spread back but it also not work.

For Process:
Could you direct me where i am going in different direction? Do we need to put 1 through loop to each child to perform proportional data spread (IF WE MAKE CHANGES (T) IN CFG FILE FOR PROPORTIONAL SPREAD, WOULD THAT HELP?)

Let me know if further information required.

Thanks
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: TI Process to spread data at consolidation Level

Post by tomok »

What is in the Expandable cube BEFORE you run the process? Is it empty? If so, the CellPutProportionalSpread will not do anything. That function can only spread when there is already something in the node you are spreading to because it needs that to do the proportional calculations.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
declanr
MVP
Posts: 1831
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: TI Process to spread data at consolidation Level

Post by declanr »

Take away the cell is updateable if statement. Assuming that is against the consolidation.

And as per Tomok's comment; if you want it to do an even spread against all children if there isn't already a number you can use ElcompN (or a mdx zero subset of that elements descendants if it has levels of separation) and loop through the nodal elements.
Declan Rodger
User avatar
sachin
Posts: 92
Joined: Fri Jan 15, 2010 9:54 pm
OLAP Product: Transformer,SSAS, EP, TM1
Version: 7.3 2005 10.1 10.1.1
Excel Version: 2013
Contact:

Re: TI Process to spread data at consolidation Level

Post by sachin »

dharav wrote: ....
Viewsubsetassign(Vtgtcube,Vtgt,'Hierarchy', 'Transformer2'); ######Transformer 2 has consolidated element 'NJ Metro'
....
Data:

IF(CELLISUPDATEABLE (Vtgtcube,'NJ Metro', V2,V3,V4)=1);
CellPutProportionalSpread(NValue,Vtgtcube,'NJ Metro',V2, V3,V4);
ENDIF;
You mentioned that "NJ Metro" is Consolidated element in Hierarchy dimension in your target cube. My understanding is that in the data tab, CellIsUpdateable is returning you 0 (Since NJ Metro will be a C type) and hence the proportional spread is not happening.
Check out my blog for some good information on TM1, SPSS
Post Reply