Page 1 of 1

Data Upload - Need suggestion(s)

Posted: Thu Oct 20, 2011 3:55 pm
by suhamore
Hi

All I want is to upload a text file, exported from an access table. The elements in 'Measure' dimension in TM1 represent columns in access table. There are around 60 measures. e.g. the data in access table ( and exported text file) looks like below.
LOB Channel Product .................Measure1 Measure2......Measure60
Value Value Value.....................Value Value Value


When I use this text file as a data source in TI, each measure becomes a variable.
How can I upload values using CellPutN function in Data tab for all the measures?
I can give variables some meaningful name and use multiple (around 60) IF-ELSEIF conditions. But I was wondering if there is any better approach to achieve the same result?

PS I tried to search relevant posts but could not find any. If similar discussion happened in the past please direct me to the link.

Thanks
suhamore

Re: Data Upload - Need suggestion(s)

Posted: Thu Oct 20, 2011 4:04 pm
by lotsaram
You could either see if you can pivot your data source and convert the field ID into a column entry.

Or if you go with the default TI variable naming of V1 to Vn then you can easily create a while loop through the variable numbers and use the concept of TI indirect variables which are explained here http://www.tm1forum.com/viewtopic.php?f ... 921#p21140

If you had say 1 to 10 measure columns then easier to just have that number of CellPutN. But if you have a large number then this technique is great to avoid repetitive coding and maintenance. (You will need some sort of "mapping" for the variable numbers to the measures though.)

Re: Data Upload - Need suggestion(s)

Posted: Thu Oct 20, 2011 4:05 pm
by tomok
suhamore wrote:When I use this text file as a data source in TI, each measure becomes a variable.
What do you mean "each measure becomes a variable"? Each column in the input file becomes whatever you want it to be based on your selections in the Variables tab. If the column contains data you pick "Data" under the Contents column. Also, make sure you put a value of "1" in the "number of title records" box on the Data Source tab. If you are asking simple questions like this you really should spend some time reading the TI manual. This is pretty elementary stuff here.