User define variables in data tab

Post Reply
Jodha
Posts: 62
Joined: Tue Mar 13, 2012 4:34 am
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2007 2010 SP1

User define variables in data tab

Post by Jodha »

Hi All,

I am using a text file to load data into TM1 cube . some of the coloumns in source file has different naming convention to dimension elements in TM1 so in order to map
it properly i am using user define variable to map the elements and load data as these are user defined varibales they get updated only after system generated code in data/metadata tab.
I want to skip elements that are not present in dimension using ITEMSKIP so that i can avoid errors in log file .

i got vDept as department variable defined from text file (data source ) i cannot use as is in TM1 so i made modification in user define variable

vTM1DepartmentName = X|vDept|Y in variable tab



In data tab before system generated code when i try to perform ASCIIouput on vTM1DepartmentName,vDept i can see only Xy, departmentname in the output

can any one tell me why vDept is skiped from vTM1DepartmentName variable even though vDept is data source generated variable and vTM1DepartmentName is already updated in Meta data tab so it should be avaiable in data tab.

I might be missing some basic point but i am intrested in knowing the reason for it .

Thanks for your time in advance
User avatar
qml
MVP
Posts: 1098
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: User define variables in data tab

Post by qml »

It looks to me like your variable vDept is probably empty, because in the data source there is nothing in that column. Is that possible? Have you checked it? Can you show the code generated by the wizard here?
Kamil Arendt
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: User define variables in data tab

Post by tomok »

Jodha wrote:can any one tell me why vDept is skiped from vTM1DepartmentName variable even though vDept is data source generated variable and vTM1DepartmentName is already updated in Meta data tab so it should be avaiable in data tab.
The Metadata and Data tabs are independent of each other, they don't carry over from one to the other. That's why you have to define user-defined variables in both tabs. Also, all your custom code must go below the system generated code.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Jodha
Posts: 62
Joined: Tue Mar 13, 2012 4:34 am
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2007 2010 SP1

Re: User define variables in data tab

Post by Jodha »

Thanks for the replys qml/tomok
i have checked vdata and it not empty
if i define my user define variable vTM1DepartmentName = X|vDept|Y before ASCII code i am geting proper result(this is above system generated code )
Capture.PNG
Capture.PNG (3.79 KiB) Viewed 3394 times

i was refering to vCleanDept as vTM1DepartmentName and vDept as dDept
and this is in Data tab
Wim Gielis
MVP
Posts: 3241
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: User define variables in data tab

Post by Wim Gielis »

Jodha,

This is all very unclear. At least to me.
Please show the full process code, and indicate what problem(s) you would still have.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply