Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
fkeuroglian
Partner - Master
Partner - Master

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

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

6 Replies
swuehl
MVP
MVP

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,'###,###',',','.'))

fkeuroglian
Partner - Master
Partner - Master
Author

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

swuehl
MVP
MVP

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,'###,###;###,###-',',','.'))

achitreskyitgroup
Partner - Contributor II
Partner - Contributor II

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.

Valerie
Contributor III
Contributor III

Thanks this really solved my problem too.

PuriVelasco
Creator
Creator

Good morning,

I have the same problem that  @fkeuroglian, but the solution doen't run for me.

I am in Qlik Sense.

I am using Sum(Num#(TEST1,'###,###',',','.')) in my field I obtain 0.

Thank you very much.