Numeric values not copying from source to target elaments
-
- Posts: 51
- Joined: Sun Sep 11, 2016 1:55 pm
- OLAP Product: Cognos Tm1
- Version: 10.2,11
- Excel Version: 2007
Numeric values not copying from source to target elaments
Hello Guys,
I have created a TI Process using bedrock logic i am able to create views and it loads the string data from source elements to target elements but it is not loading the numeric data for the first run. If i update any data even in string cells for the next run of TI it is not even copying string data to target elements. I have both string and numeric data in my cube. I have attached my TI code. Please suggest me like where i am going wrong.
I have created a TI Process using bedrock logic i am able to create views and it loads the string data from source elements to target elements but it is not loading the numeric data for the first run. If i update any data even in string cells for the next run of TI it is not even copying string data to target elements. I have both string and numeric data in my cube. I have attached my TI code. Please suggest me like where i am going wrong.
- Attachments
-
- Finance TI Process.txt
- (19.2 KiB) Downloaded 422 times
-
- Regular Participant
- Posts: 424
- Joined: Sat Mar 10, 2012 1:03 pm
- OLAP Product: IBM TM1, Planning Analytics, P
- Version: PAW 2.0.8
- Excel Version: 2019
Re: Numeric values not copying from source to target elaments
This might help.I have both string and numeric data in my cube. I have attached my TI code. Please suggest me like where i am going wrong
http://www.tm1forum.com/viewtopic.php?f=3&t=1109&p=6155 Thanks
"You Never Fail Until You Stop Trying......"
- qml
- MVP
- Posts: 1097
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: Numeric values not copying from source to target elaments
The process has a debug switch as one of its parameters. Use it and you're likely to get some information on what's going on. I doubt anyone will have the time and resolve to go through each line of that TI and try and figure out what it might be doing, especially since you haven't told us anything about your model, which means it's impossible to tell which conditions are being triggered among the dozens of IF statements.
On a separate note, I would like to draw your attention to the BedrockTM1.org copyright and licence notes:
On a separate note, I would like to draw your attention to the BedrockTM1.org copyright and licence notes:
BedrockTM1.org wrote:Anyone is free to copy, modify, use, compile, sell or distribute the original BedrockTM1.org code, documents and information (the information), either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means, with the exception that you may not reproduce or publish the information on any web site, online service or printed media without prior express permission.
Where the information is copied, modified, used, compiled, sold or distributed, credit to the original author or authors must be left intact in the code or document.
Kamil Arendt
-
- Posts: 51
- Joined: Sun Sep 11, 2016 1:55 pm
- OLAP Product: Cognos Tm1
- Version: 10.2,11
- Excel Version: 2007
Re: Numeric values not copying from source to target elaments
HI I am Just using that bedrock code as reference, i have a developed my own code. i am not publishing any original code of it. i have published an altered one which i wrote based on our requirement
-
- Posts: 51
- Joined: Sun Sep 11, 2016 1:55 pm
- OLAP Product: Cognos Tm1
- Version: 10.2,11
- Excel Version: 2007
Re: Numeric values not copying from source to target elaments
Actually In my model i have to load data within a single dimension from one element to another element , i have a combination of two dimension's version and customer dimensions, in which data needs to be loaded from one dimension to other i.e customer to customer and version to version, i am passing the customer and version from control cubes as parameters. i have written a loop such that based on the selection of elements in dimensions from control cubes it has to write data in to target elements.
-
- Regular Participant
- Posts: 424
- Joined: Sat Mar 10, 2012 1:03 pm
- OLAP Product: IBM TM1, Planning Analytics, P
- Version: PAW 2.0.8
- Excel Version: 2019
Re: Numeric values not copying from source to target elaments
As per your previous post ,You are doing the same thing,I guess,It is just that you have mixed data in the form of string and numeric.Have you checked the link I have mentioned earlier ,Just incoporate that in your code.ThanksI have to load data from my source customer to multiple target customers, similarly from source version to multiple target versions.I have a maximum of 50 target customers and 10 target versions. I am loading the data with customer and version combination. I have built lookup cube with pick list in order to pass parameters dynamically into my TI process.
"You Never Fail Until You Stop Trying......"
-
- Posts: 51
- Joined: Sun Sep 11, 2016 1:55 pm
- OLAP Product: Cognos Tm1
- Version: 10.2,11
- Excel Version: 2007
Re: Numeric values not copying from source to target elaments
Hi Abdul ,
If( nDimensionCount = 2 );
If( CellIsUpdateable( pCube, v1, v2 ) = 1 );
DimType = DType( sDim2, v2 );
If( DimType @= 'S' );
CellPutS( v3, pCube, v1, v2 );
Else;
CellPutN( Numbr( v3 ), pCube, v1, v2 );
ENDIF;
I am using both CellPutS and CellPutN in my code still it failing to write numeric values into target cells.
If( nDimensionCount = 2 );
If( CellIsUpdateable( pCube, v1, v2 ) = 1 );
DimType = DType( sDim2, v2 );
If( DimType @= 'S' );
CellPutS( v3, pCube, v1, v2 );
Else;
CellPutN( Numbr( v3 ), pCube, v1, v2 );
ENDIF;
I am using both CellPutS and CellPutN in my code still it failing to write numeric values into target cells.
- qml
- MVP
- Posts: 1097
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: Numeric values not copying from source to target elaments
You really need to add a few AsciiOutput statements around your IFs to see what exactly is going on and which sections of your code get executed. No one here is able to execute every branch of your algorithm in their head under every possible condition.aravind.cgns wrote:I am using both CellPutS and CellPutN in my code still it failing to write numeric values into target cells.
The code snippet you've just posted does not exist in the process code you posted earlier. Settle on one version and then just debug it (using AsciiOutput) to see which of your assumptions are wrong - it could be that the element types are not what you think they are or that the source view is set up wrong or some entirely different problem.
Kamil Arendt
-
- Community Contributor
- Posts: 296
- Joined: Tue Sep 06, 2016 7:55 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: Excel 2010
Re: Numeric values not copying from source to target elaments
I am posting this here because it may be related to aravind's problem.
I have an issue which is outlined in the attached document. This problem came to light when I tried to run a process to copy values from one cube to another. Everything worked OK, both string and numeric values copied over except for one numeric element which did not post any values. When investigating the problem I narrowed it down as explained in the attached document.
cheers, Mark
I have an issue which is outlined in the attached document. This problem came to light when I tried to run a process to copy values from one cube to another. Everything worked OK, both string and numeric values copied over except for one numeric element which did not post any values. When investigating the problem I narrowed it down as explained in the attached document.
cheers, Mark
- Attachments
-
- Element not showing values.docx
- (22.03 KiB) Downloaded 354 times
-
- 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: Numeric values not copying from source to target elaments
If you don't see values in a rule-calculated element when you suppress zeros it means the element has not been fed properly. Un-suppress and then right-click on one of the cells that contains the value that disappears when you suppress and then choose Check Feeders. If it says "Not Fed" then that's the problem.Mark RMBC wrote:I am posting this here because it may be related to aravind's problem.
I have an issue which is outlined in the attached document. This problem came to light when I tried to run a process to copy values from one cube to another. Everything worked OK, both string and numeric values copied over except for one numeric element which did not post any values. When investigating the problem I narrowed it down as explained in the attached document.
cheers, Mark
-
- Community Contributor
- Posts: 296
- Joined: Tue Sep 06, 2016 7:55 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: Excel 2010
Re: Numeric values not copying from source to target elaments
You are spot on Tomok, these cells are not fed. I did actually suspect this myself (honest).
Now you may start ranting at me when I say this but because I don't actually need Grade Standard Hours to be fed (because it doesn't need to be consolidated) I ignored it when writing the feeders.
Is this bad practice and will not feeding it make my cube slower?
regards, Mark
Now you may start ranting at me when I say this but because I don't actually need Grade Standard Hours to be fed (because it doesn't need to be consolidated) I ignored it when writing the feeders.
Is this bad practice and will not feeding it make my cube slower?
regards, Mark
-
- 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: Numeric values not copying from source to target elaments
No, it's not bad practice to skip feeding an element, at least IMO. However, not doing so means the element will not consolidate AND it will disappear when you zero suppress.Mark RMBC wrote:You are spot on Tomok, these cells are not fed. I did actually suspect this myself (honest).
Now you may start ranting at me when I say this but because I don't actually need Grade Standard Hours to be fed (because it doesn't need to be consolidated) I ignored it when writing the feeders.
Is this bad practice and will not feeding it make my cube slower?
regards, Mark
- qml
- MVP
- Posts: 1097
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: Numeric values not copying from source to target elaments
Not at all. Underfeeding by itself cannot make a cube slower - if anything, it will be faster. It can however lead to incorrect results or zero suppression problems - sometimes these can be acceptable or worked around and sometimes they cannot.Mark RMBC wrote:Is this bad practice and will not feeding it make my cube slower?
Also, I would like to mention one additional circumstance where rule calculations might not work. If you do a DimensionElementInsertDirect without recompiling the dimension with DimensionUpdateDirect, a rule can fail to attach to the new element.
Kamil Arendt
-
- Community Contributor
- Posts: 296
- Joined: Tue Sep 06, 2016 7:55 am
- OLAP Product: TM1
- Version: 10.1.1
- Excel Version: Excel 2010
Re: Numeric values not copying from source to target elaments
Thanks for the responses and the advice. I will leave unfed because as things stand I don't need to feed it and everything appears to be working correctly!
I will bold this in the design document
I will bold this in the design document

-
- Posts: 51
- Joined: Sun Sep 11, 2016 1:55 pm
- OLAP Product: Cognos Tm1
- Version: 10.2,11
- Excel Version: 2007
Re: Numeric values not copying from source to target elaments
Hi Guys,
I was able to load both String and Numeric data now but i have a problem in creating Subset with multiple elements as i am using while loop it is taking the last element in the control cube . I need subset which has multiple elements being included . Please find the attached document and suggest me like where i am missing.
I was able to load both String and Numeric data now but i have a problem in creating Subset with multiple elements as i am using while loop it is taking the last element in the control cube . I need subset which has multiple elements being included . Please find the attached document and suggest me like where i am missing.
- Attachments
-
- TI Process.docx
- (15.47 KiB) Downloaded 361 times
-
- Posts: 51
- Joined: Sun Sep 11, 2016 1:55 pm
- OLAP Product: Cognos Tm1
- Version: 10.2,11
- Excel Version: 2007
Re: Numeric values not copying from source to target elaments
If( ViewExists( pCube, cTempViewFrom ) = 1 );
ViewDestroy( pCube, cTempViewFrom );
EndIf;
ViewCreate( pCube, cTempViewFrom );
If( SubsetExists( pDimension, cTempSubFrom ) = 1 );
SubsetDeleteAllElements( pDimension, cTempSubFrom );
Else;
SubsetCreate( pDimension, cTempSubFrom );
EndIf;
SubsetElementInsert( pDimension, cTempSubFrom, pSourceCustomer, i );
ViewSubsetAssign( pCube, cTempViewFrom, pDimension, cTempSubFrom );
Actually in the above code when i am trying to create the view it is throwing the below error ;
Position of elements exceeds the number of elements in subset + 1.
ViewDestroy( pCube, cTempViewFrom );
EndIf;
ViewCreate( pCube, cTempViewFrom );
If( SubsetExists( pDimension, cTempSubFrom ) = 1 );
SubsetDeleteAllElements( pDimension, cTempSubFrom );
Else;
SubsetCreate( pDimension, cTempSubFrom );
EndIf;
SubsetElementInsert( pDimension, cTempSubFrom, pSourceCustomer, i );
ViewSubsetAssign( pCube, cTempViewFrom, pDimension, cTempSubFrom );
Actually in the above code when i am trying to create the view it is throwing the below error ;
Position of elements exceeds the number of elements in subset + 1.
- qml
- MVP
- Posts: 1097
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: Numeric values not copying from source to target elaments
Change the below line:aravind.cgns wrote:Actually in the above code when i am trying to create the view it is throwing the below error ;
Position of elements exceeds the number of elements in subset + 1.
Code: Select all
SubsetElementInsert( pDimension, cTempSubFrom, pSourceCustomer, i );
Code: Select all
SubsetElementInsert( pDimension, cTempSubFrom, pSourceCustomer, 1 );
It would also be very kind of you to share with us how you solved your first problem. It could help someone else, you know.
Kamil Arendt
-
- Posts: 51
- Joined: Sun Sep 11, 2016 1:55 pm
- OLAP Product: Cognos Tm1
- Version: 10.2,11
- Excel Version: 2007
Re: Numeric values not copying from source to target elaments
Abdul,
Intially i was using SubsetElementInsert( pDimension, cTempSubFrom, pSourceCustomer, 1 );
but i have multiple source customers and multiple target customers being selected in the control cube , so i need multiple elements to be added in my subset. when i use the above code it is creating the subset with the last element selected in the control which does not fit our requirement. suggest me like based on the loop it should create a subset which includes multiple elements included in my subset so that in my view i can see all the elements selected in my control cube.
Intially i was using SubsetElementInsert( pDimension, cTempSubFrom, pSourceCustomer, 1 );
but i have multiple source customers and multiple target customers being selected in the control cube , so i need multiple elements to be added in my subset. when i use the above code it is creating the subset with the last element selected in the control which does not fit our requirement. suggest me like based on the loop it should create a subset which includes multiple elements included in my subset so that in my view i can see all the elements selected in my control cube.
- qml
- MVP
- Posts: 1097
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: Numeric values not copying from source to target elaments
I think you have me confused with someone else.aravind.cgns wrote:Abdul,
You will need a WHILE loop that will cycle through something (a subset, a dimension etc.) that will allow you to execute SubsetElementInsert multiple times. The last parameter for this function is the location where you want to insert the element - it doesn't magically insert multiple elements for you, so I have no idea why you would expect that to happen.aravind.cgns wrote:i have multiple source customers and multiple target customers being selected in the control cube , so i need multiple elements to be added in my subset. when i use the above code it is creating the subset with the last element selected in the control which does not fit our requirement. suggest me like based on the loop it should create a subset which includes multiple elements included in my subset so that in my view i can see all the elements selected in my control cube.
Kamil Arendt
-
- Posts: 51
- Joined: Sun Sep 11, 2016 1:55 pm
- OLAP Product: Cognos Tm1
- Version: 10.2,11
- Excel Version: 2007
Re: Numeric values not copying from source to target elaments
Abdul,
I have while loop in my code u can see in my attached code, still i am facing the issue.
I have while loop in my code u can see in my attached code, still i am facing the issue.