Page 1 of 1

Number Rounding issue in TI process

Posted: Thu Jun 05, 2014 6:17 pm
by Jodha
I am trying to load data based on columns names.If elements belong to Parent A load Coloumn A data ,If elements belong to Parent B load coloumn B data using a TI process.The issue i am facing is number rounding .

If i use vcomp = xyz * 100000 and use vcomp directly to load data it is showing correct numbers.
when i tried to load vcomp data using an IF statment it rounding up to nearest number

IF (ELISCOMP('Accounts' , v11,'ParentA') @=1);
vcomp = xyz*1000000 ;

ELSEIF( ELISCOMP('Accounts' , v11,'ParentA') @=1 ) ;
vcomp = ABC*1000000 ;

ENDIF;


If i load vcomp directly iam getting correct numbers but if i use IF statement it is rounding to nearest number.

Ex: XYZ = 1.362844071
vcomp value with out IF statement =1362844.071
vComp value in IF statement = 1388931.767,


I checked values using ASCIIOUT extract .

I am using TM1 10.2.2 on windows 2008 R2.

Thanks for you help in advance

Re: Number Rounding issue in TI process

Posted: Thu Jun 05, 2014 6:38 pm
by tomok
Since when is 1388931.767 the next nearest number to 1362844.071??? They're not even close.

Re: Number Rounding issue in TI process

Posted: Thu Jun 05, 2014 6:55 pm
by Duncan P
Never mind the rounding. How does @=1 even compile?

Re: Number Rounding issue in TI process

Posted: Thu Jun 05, 2014 6:58 pm
by jim wood
It looks to me like you really need to trace your numbers. Create a smaller data source that you know what the answer should be and trace it through. As Tomok pointed out this certainly isn't a rounding issue.

Re: Number Rounding issue in TI process

Posted: Thu Jun 05, 2014 10:28 pm
by ardi
In your IF statement you dont cover all cases ( you have IF and ELSEIF conditions only) , so in case none of conditions are true, then the value of your vComp could be coming from a previous row in your data source.
Can you post all the code from data tab?
This is definitely not a rounding issue. Just check the data

Re: Number Rounding issue in TI process

Posted: Fri Jun 06, 2014 3:21 pm
by Jodha
Thanks every one for the replies .

I was scratching my head from yestarday thinking it is round off issue, Fresh pair of eyes always helps .I modified my IF ELSE statement it is working perfect.

Thanks every one for your time.