Hi hope someone can help.
We are trying to load Capex Items to a Cube from a CSV File.
Each Capex Item creates it own element based on the value of the Last Element IE Consolidation Cost Centre 1310 , Element 1310 - 00001
We can successfully create all of the Elements correctly in the MetaData however when we come to add data to the Cube we have an issue as we dont know the number of records to loop through and
the element to add the data to within the Cube.
We have used a numbering system within the CSV files however this is difficult to maintain when multiple files are being uploaded.
Thank you...
TM1 Process create element and add Data
-
- Community Contributor
- Posts: 132
- Joined: Thu Oct 15, 2009 7:45 pm
- OLAP Product: TM1
- Version: 9.4.1 9.5 9.5.1
- Excel Version: 2003 2007
Re: TM1 Process create element and add Data
Firstly, I would suggest splitting up this into 2 processes. Although, you can add elements and then subsequently load data to it in the same process, I have found that it is best to split this task into 2.
Do you have any alias on your elements? Or is this there any unique identifier that you can add to each element (current and any you add) that would also be present in the load file? This would ease the task of loading in the data.
Do you have any alias on your elements? Or is this there any unique identifier that you can add to each element (current and any you add) that would also be present in the load file? This would ease the task of loading in the data.
Ankur Jain
- Martin Ryan
- Site Admin
- Posts: 2003
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: TM1 Process create element and add Data
A couple of ideas for keeping track of your counter.
One: in the prolog have counter=0; in the data tab have counter=counter+1; then you can keep track of how many records you have processed. As a variation you can increment the counter only when you actually write something.
Two: loop through a list in the data tab
i=0;
while(i<1000);
i=i+1;
if(cellgetn('cube', dim1, dim2, i)=0);
cellputn(value, 'cube', dim1, dim2, i);
i=10001; # to ensure we exit the while loop
else;
# Do nothing, skip on to next i
endif;
end;
Hopefully that should help you along.
Martin
One: in the prolog have counter=0; in the data tab have counter=counter+1; then you can keep track of how many records you have processed. As a variation you can increment the counter only when you actually write something.
Two: loop through a list in the data tab
i=0;
while(i<1000);
i=i+1;
if(cellgetn('cube', dim1, dim2, i)=0);
cellputn(value, 'cube', dim1, dim2, i);
i=10001; # to ensure we exit the while loop
else;
# Do nothing, skip on to next i
endif;
end;
Hopefully that should help you along.
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer