same cube CellGetN for a IF argument and CellPutN

Post Reply
BigG
Community Contributor
Posts: 211
Joined: Tue Sep 15, 2009 11:13 pm
OLAP Product: IBMPA
Version: PA 2.0 Cloud
Excel Version: 2010

same cube CellGetN for a IF argument and CellPutN

Post by BigG »

Hi there,

I have a 'detailed cube' with a string element in measure dimension - REGION. Within the same cube and measure dimension I have numeric VALUE.

A global cube holds region % rates. Region is a dimension for this global cube.

A TI Process transforms the VALUE into further detail by multiplying by each regions % rates. To get the correct % we need to refer to what REGION from string in detailed cube, then get the related % from global cube.

I havent fully tested this but Is the best way to do this by (not true syntax below but basic logic)

Code: Select all

IF(cellgets(detailed cube)) = 'a region';
CellPutN(target cube*% a region)
ELSEIF(cellgets(detailed cube)) = 'another  region';
CellPutN(target cube* another region)
GG
tomok
MVP
Posts: 2832
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: same cube CellGetN for a IF argument and CellPutN

Post by tomok »

There is no need to do a list of IF and ELSEIF's as long as the value in the REGION element of the measures dimension corresponds EXACTLY to one of the elements in the REGION dimesion of the global cube. I don't know where the value you are multiplying by the rate is coming from since I don't know the source in your TI process. Assuming you are using a view from the detail cube which pulls VALUE, and your "Target" cube has a measures dimension with a numeric element called "VALUE", you can just do this:

Region = CellGets('detailed',Dim1, Dim2,..DimX,'REGION');
Rate = CellGetN('Global',Dim1, Dim2,..DimX,Region);
NewValue = VALUE * Rate;
CellPutN(NewValue,'Target',Dim1,Dim2,DimX..,'VALUE')
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
BigG
Community Contributor
Posts: 211
Joined: Tue Sep 15, 2009 11:13 pm
OLAP Product: IBMPA
Version: PA 2.0 Cloud
Excel Version: 2010

Re: same cube CellGetN for a IF argument and CellPutN

Post by BigG »

thanks, this all makes sense. cheers for response
GG
Post Reply