Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: Casting String to Number

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

LOAD

     evaluate(FIELD) as FIELD,

...

FROM ...;

5 Replies

Re: Casting String to Number

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
MVP
MVP

Re: Casting String to Number

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

LOAD

     evaluate(FIELD) as FIELD,

...

FROM ...;

MVP
MVP

Re: Casting String to Number

HI,

Try this

=Num(60000000098634125780)

I am getting this as result 6.0000000098634e+019

Regards,

Jagan.

Not applicable

Re: Casting String to Number

Try num(num#(column) )..

Not applicable

Re: Casting String to Number

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)

Community Browser