
Re: Problem with big numbers (more than 14 digits)
Sunny Talwar May 31, 2018 5:12 AM (in response to omar bensalem )
Re: Problem with big numbers (more than 14 digits)
omar bensalem May 31, 2018 5:25 AM (in response to Sunny Talwar )Great !

Re: Problem with big numbers (more than 14 digits)
omar bensalem May 31, 2018 5:30 AM (in response to Sunny Talwar )
Re: Problem with big numbers (more than 14 digits)
Sunny Talwar May 31, 2018 7:03 AM (in response to omar bensalem )Throws an error when you run it? Use 10000000000 instead of 1E10 I guess

Re: Problem with big numbers (more than 14 digits)
omar bensalem May 31, 2018 7:43 AM (in response to Sunny Talwar )
Re: Problem with big numbers (more than 14 digits)
Sunny Talwar May 31, 2018 7:48 AM (in response to omar bensalem )Are you summing the numbers or counting them?

Re: Problem with big numbers (more than 14 digits)
omar bensalem May 31, 2018 8:00 AM (in response to Sunny Talwar )summing sunny;
this CDR is composed of 5 lines; one line contains a 14 digits numbers (the 18 .. numbers shown in the screenshot and imported as so); while the 4 other contain 15 digits numbers; these 15 digits numbers are all imported as 0 using this :
LOAD Div(Field, 1e10) & left(repeat('0',10), 10  len(text(Mod(Field, 1e10)))) & Mod(Field, 1e10) as MyNum
while they were imported correctly using evaluate().

Re: Problem with big numbers (more than 14 digits)
Sunny Talwar May 31, 2018 8:15 AM (in response to omar bensalem )I think Ralf's formula is converting the number into text which is why I don't think you can sum it.... only thing I can think about is to divide the number for 1000 or 10000 may be...or may be Henric Cronström can give you better idea.







Re: Problem with big numbers (more than 14 digits)
Henric Cronström May 31, 2018 5:17 AM (in response to omar bensalem )Evaluate() should be able to evaluate a string as a number no matter how large the number is. So if this fails, there is something else that is wrong. Can you post an example where it fails?
It is important, however, to understand that the Qlik engine internally stores numbers using the 64bit binary data type, which means only 1415 valid decimal digits. In other words: Evaluate() will round the number to something with 1415 valid digits.
HIC

Re: Problem with big numbers (more than 14 digits)
omar bensalem May 31, 2018 5:23 AM (in response to Henric Cronström )Thank you for ur time; I'd have a question though:
what if the exact numbers is 16 digits and must be kept that way? How should we proceed?

Re: Problem with big numbers (more than 14 digits)
Henric Cronström Jun 1, 2018 1:51 AM (in response to omar bensalem )If you want all 16 digits, and treat it like text, you can load it as
Text(Field)
but then you cannot use it as a number.
You can also load it using
Dual(Field, Evaluate(Field))
Then you will get the original string (all 16 digits) as the textual value, and the evaluated string as numeric value. This works fine as long as you don't have two field values with identical 15 digits, but different 16th digit.
HIC

