Page 1 of 1
TI error
Posted: Tue Jul 01, 2014 4:06 am
by mincharug.shulft
Hello:
My data is coming in the following format
Quatity = 2,10,000.00
Quatity1 = 3,33,000.00
BUT as per my requirement I have to have minus
Amount= Quatity 1-Quatity
So If I use the above formula in the data tab (attached screen)
I am getting the attached error. Can you any help really appreciated.
Re: TI error
Posted: Tue Jul 01, 2014 4:09 am
by Alan Kirk
mincharug.shulft wrote:Hello:
My data is coming in the following format
Quatity = 2,10,000.00
Quatity1 = 3,33,000.00
BUT as per my requirement I have to have minus
Amount= Quatity 1-Quatity
So If I use the above formula in the data tab (attached screen)
I am getting the attached error. Can you any help really appreciated.
You don't have terminating semi-colons on the lines
Quatity = 2,10,000.00
Quatity1 = 3,33,000.00
Also, get rid of the formatting. The assignments should be of numbers, not text as number.
It would need to be:
Code: Select all
Quatity = 210000.00;
Quatity1 = 333000.00;
Re: TI error
Posted: Tue Jul 01, 2014 4:39 am
by mincharug.shulft
Hi Alan,
Thanks per the quick reply
As this data is coming from oracle like below format only.there i can't change
so is there any way to do changes in TI in data tab??? please suggest
Alan Kirk wrote:mincharug.shulft wrote:Hello:
My data is coming in the following format
Quatity = 2,10,000.00
Quatity1 = 3,33,000.00
BUT as per my requirement I have to have minus
Amount= Quatity 1-Quatity
So If I use the above formula in the data tab (attached screen)
I am getting the attached error. Can you any help really appreciated.
You don't have terminating semi-colons on the lines
Quatity = 2,10,000.00
Quatity1 = 3,33,000.00
Also, get rid of the formatting. The assignments should be of numbers, not text as number.
It would need to be:
Code: Select all
Quatity = 210000.00;
Quatity1 = 333000.00;
Re: TI error
Posted: Tue Jul 01, 2014 4:53 am
by Alan Kirk
mincharug.shulft wrote:Hi Alan,
Thanks per the quick reply
As this data is coming from oracle like below format only.there i can't change
so is there any way to do changes in TI in data tab??? please suggest
Alan Kirk wrote:mincharug.shulft wrote:Hello:
My data is coming in the following format
Quatity = 2,10,000.00
Quatity1 = 3,33,000.00
BUT as per my requirement I have to have minus
Amount= Quatity 1-Quatity
So If I use the above formula in the data tab (attached screen)
I am getting the attached error. Can you any help really appreciated.
You don't have terminating semi-colons on the lines
Quatity = 2,10,000.00
Quatity1 = 3,33,000.00
Also, get rid of the formatting. The assignments should be of numbers, not text as number.
It would need to be:
Code: Select all
Quatity = 210000.00;
Quatity1 = 333000.00;
You're missing a couple of key points.
First, the example that you provided was NOT using the variables that were coming from the data source. It was just something that you had typed as a variable assignment. In such circumstances (a) You cannot use number formatting (that is, comma groupings) or you'll get a syntax error, and (b) You need to terminate every line with a semi-colon, or you'll get a syntax error (as indeed you did, as TI was trying to merge the code of two unrelated lines).
Second, Oracle (or any database system) will not be outputting numeric values with commas unless the values are being converted to text, which would be a singularly daft idea for a data interface. Which means that they probably don't have commas, which means that all you have to do is use the
real data source variables in your calculation,
not user defined ones as you've done in your example. This presupposes that you have the variables set to a Numeric type to begin with.
Re: TI error
Posted: Tue Jul 01, 2014 5:45 am
by mincharug.shulft
Hi Alan
Sorry i just had the attached screen from my example as i was not able to share the original data BUT
what i mean to say is
i am using oracle datasource and and the data is coming in the attached formats
and i used the variable type is string for quantity,quantity1 and also contents i used as other and then i loading into the cube directly these two measures data
and after loading i am getting the data from cube using the cellgets and then trying to do the minus of quantity,quantity1 by the time i am getting this error
so what i want is out of this,is there any way to so minus when data is in the above formating?Please suggest.
or if i do the same in rule also i am not able to get the data in amount measure due to this , and $
Pleasse suggest?
Re: TI error
Posted: Tue Jul 01, 2014 7:47 am
by mincharug.shulft
Does any one has any idea? can it be done in TI?
Re: TI error
Posted: Tue Jul 01, 2014 8:54 am
by lotsaram
mincharug.shulft wrote:Hi Alan
Sorry i just had the attached screen from my example as i was not able to share the original data BUT
what i mean to say is
i am using oracle datasource and and the data is coming in the attached formats
and i used the variable type is string for quantity,quantity1 and also contents i used as other and then i loading into the cube directly these two measures data
and after loading i am getting the data from cube using the cellgets and then trying to do the minus of quantity,quantity1 by the time i am getting this error
so what i want is out of this,is there any way to so minus when data is in the above formating?Please suggest.
or if i do the same in rule also i am not able to get the data in amount measure due to this , and $
Pleasse suggest?
I would have thought, in fact I would go as far to say that having read Alan's post
any sensible person with an ounce of common sense would have thought that the answer is very obvious. Change _ the _ data _ type _ of _ the _ variables _ to _ numeric !
To perform arithmetic operations you need numbers not text. Why would you want to store numeric quantity information in a cube as text in the first place?
Re: TI error
Posted: Tue Jul 01, 2014 9:13 am
by deepakjain2020
mincharug.shulft wrote:Does any one has any idea? can it be done in TI?
V1 is a variable.
#Below statement will get rid off the $ symbol.
Var=SUBST(V1,2,long(V1));
Next convert your string into number
Var2=StringToNumber(Var);
hope after this you can help out yourself.
Regards,
Deepak Jain
Re: TI error
Posted: Tue Jul 01, 2014 9:49 am
by mincharug.shulft
Hello lotsaram,
i clearly understood what Alan's posted,
BUT the problem is the following:
I am getting the data with combination of the following
ex: $100.00
$2,10,120.00
1000.10
2000.00
so if i choose the data type of the variable as numeric only i am able to load the numeric data BUT my business want it the same numbers what is there in the oracle
that's why i used the string.and then i have to so minus(arithmetic operations) NOW you tell me what should i do?????????
lotsaram wrote:mincharug.shulft wrote:Hi Alan
Sorry i just had the attached screen from my example as i was not able to share the original data BUT
what i mean to say is
i am using oracle datasource and and the data is coming in the attached formats
and i used the variable type is string for quantity,quantity1 and also contents i used as other and then i loading into the cube directly these two measures data
and after loading i am getting the data from cube using the cellgets and then trying to do the minus of quantity,quantity1 by the time i am getting this error
so what i want is out of this,is there any way to so minus when data is in the above formating?Please suggest.
or if i do the same in rule also i am not able to get the data in amount measure due to this , and $
Pleasse suggest?
I would have thought, in fact I would go as far to say that having read Alan's post
any sensible person with an ounce of common sense would have thought that the answer is very obvious. Change _ the _ data _ type _ of _ the _ variables _ to _ numeric !
To perform arithmetic operations you need numbers not text. Why would you want to store numeric quantity information in a cube as text in the first place?