Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Partner
Partner

Convert Text to Number

I want to convert TEXT to NUMBER, but when i convert in the view table, do not say NUMBER FORMAT(not appear any format) and when I try to SUM() the convert field , the result is 0.

Please help, i attach the example .qvd

it have 2 object, one correct with the NUM# function(appears the value) and other with the sum() function that show 0(CERO)

if anybody can see, I apreciatte a lot !!!

Fernando

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Convert Text to Number

Your num#() function doesn't work properly, but unfortunately num#() will return the original string, if the parsing failed.

(check by using num(num#(FIELD, FORMAT)) to see if the parsing worked out).

This should work, using a different format code and separator definitions:

=Sum(Num#(TEST1,'###,###',',','.'))

View solution in original post

5 Replies
Highlighted
MVP
MVP

Re: Convert Text to Number

Your num#() function doesn't work properly, but unfortunately num#() will return the original string, if the parsing failed.

(check by using num(num#(FIELD, FORMAT)) to see if the parsing worked out).

This should work, using a different format code and separator definitions:

=Sum(Num#(TEST1,'###,###',',','.'))

View solution in original post

Highlighted
Partner
Partner

Re: Convert Text to Number

Thank you SWUEHL!!

thats work ok! another question pherhaps you know, I have another problem, do not recognize negatives value, it seems that they not numbers

if you select a negative value, its return -

thank you a lot!!

Fernando

Highlighted
MVP
MVP

Re: Convert Text to Number

A negative value has a trailing minus sign in your case? Then you need to add the format for your negative values in the format code:

=Sum(Num#(TEST1,'###,###;###,###-',',','.'))

Highlighted

Re: Convert Text to Number

I want to Convert text to Number. My data is as follows:

SALES_DOLLARS
 
6336,21
3991,81
19008,63
-4688,8
4435,34
6336,21
 
6336,21
 
 
4435,34
4435,34

 

I want to replace the ',' to a '.(Decimal)' and change the type from Text to Number.

 

Thank you.

Highlighted
New Contributor III

Re: Convert Text to Number

Thanks this really solved my problem too.