Qlik Community

Ask a Question

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

String to number conversion

Hello to everybody,

how can I convert ( in LOAD SCRIPT)  the string 123456.34 to number  123456.34?

And for negative value string -123456.34 to number -123456.34

I have tried the instruction Num( ) but I cannot understand the syntax to manage the negative value

Regards

Oronzo

1 Solution

Accepted Solutions
Not applicable

Hello

i have tried Num() and Num#() but for negative value, the string remains string and I cannot display on a chart

this is my load script

LOAD

Num#(Totale,'0.0') as Totale,

...........................

FROM

.....

Regards

Oronzo

View solution in original post

5 Replies
Not applicable

Hi,

   You can try like num(field) as field_name

Ex:

Num(String_field) as No_Field

-Jai

Hi,

     Num() handles negative values also.

     Check it whether you have null values in your field.

     You should use like this

     Load

          Fields,

          Num(Field) as Number

     From..

Hope it helps

Celambarasan

MVP & Luminary
MVP & Luminary

Hi,

You can Num() or Num#() to format String to Number. 

Regards,

Jagan.

Not applicable

Hello

i have tried Num() and Num#() but for negative value, the string remains string and I cannot display on a chart

this is my load script

LOAD

Num#(Totale,'0.0') as Totale,

...........................

FROM

.....

Regards

Oronzo

View solution in original post

Not applicable

Thanks to everybody,

it was simply a problem with format number

if I use in the load SCRIPT

Num#(Totale,'0.00') as Totale,

it works fine

Regards

oronzo