Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alerse
Contributor II
Contributor II

Big numbers not loading as numbers

Hi

I've got a very strange problem. One of my data sources have quite a large number in it, lets call it longNum (10735136080000000.000000). My load script is this: (precision can be anything from 0 to 9)

if(precision = 0,longNum,longNum/(pow(10,precision))) as field1,

In QlikView field1 is now empty... Any idea how to fix this? I can bring in the field as a string but as soon as I try to do the division it breaks again.

Your help will be appreciated!!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You are right, the calculation of newValue seems to be incorrect with regard to adding the right / mid part.

Change the part using the mid function to

mid(floorlongnum,11)

(before, we started with 10, that duplicated the value).

Regards,

Stefan

View solution in original post

19 Replies
swuehl
MVP
MVP

Hi,

I think there ist a comma missing between the two paths inside the if-function.

Just a typo in the posting?

Stefan

alerse
Contributor II
Contributor II
Author

Hi Stefan

Yes, sorry, just a typo in the post.

swuehl
MVP
MVP

Is your longnum field aufgefüllt recognized as

numerical data type by QlikView?

Are you using an Oracle DB ?

Try using num#() resp. num() functions to parse in resp. format numerical values.

Stefan

swuehl
MVP
MVP

Sorry, it was meant to be "successfully recognized"

This auto correction Is killing me ...

alerse
Contributor II
Contributor II
Author

no problem

Ive tried that, it still passes it as a string to qlikview... My source is a normal comma seperated text file.

I will upload the document now...

alerse
Contributor II
Contributor II
Author

ok, after some further investigation it looks like QlikView converts any number with more than 14 characters into text... Still no solution yet on how to get it numeric.

Not applicable

Hi alerse,

I add a preceding LOAD to your script and lost these four larger values without any (error-)message.

LOAD

    precision,

    longnum,

    longnum * 1        AS lostnum1,

    num(longnum)    AS lostnum

    ;

Is it a bug or a feature ?

Roland

SunilChauhan
Champion
Champion

see the attached file

hope this helps

Sunil Chauhan
alerse
Contributor II
Contributor II
Author

Hi Sunil

Thanks for your help. UNfortunately that didnt work... If you just look at your new field it looks ok but if you bring in the longnum field you'll see we're missing the 4 long numbers...