Data to send using Attibutes

Post Reply
Pierre06
Posts: 22
Joined: Tue Feb 25, 2014 12:37 pm
OLAP Product: IBM Cognos TM1
Version: 10.2
Excel Version: Excel 2013

Data to send using Attibutes

Post by Pierre06 »

Hi,

I want to allocate costs on 4 different lines (leaf elements with no rules attached) based on the attribute ('Service Type') of an 'Element' using a TI process.
The attribute data are 'X' or 'Y' or blank.
My 4 different lines are 'R&D X', 'R&D Y', 'ACC X' and 'ACC Y'.

My final command to send the costs is working (I tested to send data directly in 'R&D X' element and it worked) but not when I replace the leaf element by V9 (see hereafter for command).

IF(ATTRS('2_DimName','Element','Service Type')@='');
Itemskip;
ELSEIF(ELISANC('2_Cost_Center','[R&D]','Cost_center') = 1);
V9 = 'R&D '|CellGetS('2_DimName','Element','Service Type');
V9 = 'ACC '|CellGetS('2_DimName','Element','Service Type');
ENDIF;

Do you have any idea ?
Thanks.
EvgenyT
Community Contributor
Posts: 324
Joined: Mon Jul 02, 2012 9:39 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: 2016
Location: Sydney, Australia

Re: Data to send using Attibutes

Post by EvgenyT »

My final command to send the costs is working (I tested to send data directly in 'R&D X' element and it worked) but not when I replace the leaf element by V9 (see hereafter for command).
IF(ATTRS('2_DimName','Element','Service Type')@='');
Itemskip;
ELSEIF(ELISANC('2_Cost_Center','[R&D]','Cost_center') = 1);
V9 = 'R&D '|CellGetS('2_DimName','Element','Service Type');
V9 = 'ACC '|CellGetS('2_DimName','Element','Service Type');
ENDIF;
Ok, where is the send part of the TI? Also, V9 will only get Service Type string for 'ACC '|CellGetS('2_DimName','Element','Service Type')' based on your declaration above.. I suspect it should be
V9 = 'Element '|CellGetS('2_DimName','Element','Service Type') ?


ET
Pierre06
Posts: 22
Joined: Tue Feb 25, 2014 12:37 pm
OLAP Product: IBM Cognos TM1
Version: 10.2
Excel Version: Excel 2013

Re: Data to send using Attibutes

Post by Pierre06 »

Hi Evgeny,

hereafter is the send part of the TI:
CellIncrementN(vData, 'OUTPUT_Cube', 'Euro', 'Actuals', 'Jan-14', V9, 'Product_Name', 'Value');
Also, V9 will only get Service Type string for 'ACC '|CellGetS('2_DimName','Element','Service Type')' based on your declaration above.. I suspect it should be
V9 = 'Element '|CellGetS('2_DimName','Element','Service Type') ?
In fact I want to send the data on my 4 elements that are a concatenation of 'R&D' or 'ACC' and the attribute.
EvgenyT
Community Contributor
Posts: 324
Joined: Mon Jul 02, 2012 9:39 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: 2016
Location: Sydney, Australia

Re: Data to send using Attibutes

Post by EvgenyT »

In fact I want to send the data on my 4 elements that are a concatenation of 'R&D' or 'ACC' and the attribute.
Well you are not going to achieve it by declaring v9 to 'ACC' only
Pierre06
Posts: 22
Joined: Tue Feb 25, 2014 12:37 pm
OLAP Product: IBM Cognos TM1
Version: 10.2
Excel Version: Excel 2013

Re: Data to send using Attibutes

Post by Pierre06 »

but I thought that by writting 'ACC '|CellGetS('2_DimName','Element','Service Type') it will concatenate 'ACC ' and the attribute.
Am I wrong ?
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Data to send using Attibutes

Post by paulsimon »

Hi

I think the key problem is that you have 'Element'. Surely Element is a variable so it should be just Element with no quotes?

Regards

Paul Simon
Pierre06
Posts: 22
Joined: Tue Feb 25, 2014 12:37 pm
OLAP Product: IBM Cognos TM1
Version: 10.2
Excel Version: Excel 2013

Re: Data to send using Attibutes

Post by Pierre06 »

Hi Paul,

you are right. There should not be quote, I wrongly put them when writting this post but in the formula I am using there are none.

IF(ATTRS('2_DimName',Element,'Service Type')@='');
Itemskip;
ELSEIF(ELISANC('2_Cost_Center','[R&D]','Cost_center') = 1);
V9 = 'R&D '|CellGetS('2_DimName',Element,'Service Type');
V9 = 'ACC '|CellGetS('2_DimName',Element,'Service Type');
ENDIF;

Still it doesn't work.
EvgenyT
Community Contributor
Posts: 324
Joined: Mon Jul 02, 2012 9:39 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: 2016
Location: Sydney, Australia

Re: Data to send using Attibutes

Post by EvgenyT »

Are you saying data not being posted to ACC, R&D or both?

Bases on your code it will only be posted to ACC if it meets ELISANC condition above, if you want to post to different lines you should be declaring V9 = Element | CellGets....

Thanks
Pierre06
Posts: 22
Joined: Tue Feb 25, 2014 12:37 pm
OLAP Product: IBM Cognos TM1
Version: 10.2
Excel Version: Excel 2013

Re: Data to send using Attibutes

Post by Pierre06 »

Data are not posted on both.
I want to say: if R&D is the ancestor of the cost center then V9 is the concatenation of R&D and the attribute of Element. If not then V9 is the concatenation of ACC and the attribute of Element.

Is my command wrongly written ?
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: Data to send using Attibutes

Post by tomok »

Pierre06 wrote:Data are not posted on both.
I want to say: if R&D is the ancestor of the cost center then V9 is the concatenation of R&D and the attribute of Element. If not then V9 is the concatenation of ACC and the attribute of Element.

Is my command wrongly written ?
Yes. Don't you think you may need another ELSE in there between the two V9 assignments?????
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Pierre06
Posts: 22
Joined: Tue Feb 25, 2014 12:37 pm
OLAP Product: IBM Cognos TM1
Version: 10.2
Excel Version: Excel 2013

Re: Data to send using Attibutes

Post by Pierre06 »

Yes Tomok, you are right. It works now.
Thanks to all for your help.
Post Reply