Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Casting String to Number

Hi,

I am having this issue, I am loading a column with 20 digits '60000000098634125780' and QV is getting it as a string but I need it to be recognized as a number.

I have tried num#(column) and it stills get it as a string and if I use the num() function it does not convert any value just drop them and leave them null.

What would you recommend to do?

Thank you for your time.

Ryu,

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try evaluate() when reading in the field in your script:

LOAD

     evaluate(FIELD) as FIELD,

...

FROM ...;

View solution in original post

6 Replies
Gysbert_Wassenaar

That's too many digits to make a number from. QV supports 14 digits. Beyond that it will stay text.


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

Try evaluate() when reading in the field in your script:

LOAD

     evaluate(FIELD) as FIELD,

...

FROM ...;

jagan
Luminary Alumni
Luminary Alumni

HI,

Try this

=Num(60000000098634125780)

I am getting this as result 6.0000000098634e+019

Regards,

Jagan.

Not applicable
Author

Try num(num#(column) )..

Not applicable
Author

really thanks!

i don't know why but i couldn't suppress zeros (for example from '00000000232') with the num function, but using evaluating i could obtein it (for example 232)

BhargaviPK
Contributor
Contributor

that worked out for me! thanks!