Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

String to number conversion

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

5 Replies
Not applicable

String to number conversion

Hi,

   You can try like num(field) as field_name

Ex:

Num(String_field) as No_Field

-Jai

String to number conversion

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
MVP

String to number conversion

Hi,

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

Regards,

Jagan.

Not applicable

String to number conversion

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

Not applicable

String to number conversion

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

Community Browser