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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text to Number Issue.

Hi,

I'm loading data from a text file with the following amount format 1 000 000,00

I've tried trim, replace, num, but nothing seems to work. I cannot get rid of the spaces in order to convert to number.

Any ideas?

Pls see attached sample data and qv-file

Thanks in advance,

Olle

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Aaah!! 

Need to remove the comma as well.

     num(keepchar(@73:92,'1234567890'))  as AMOUNT,

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try with

Num(replace(myField, ' ', ''))

let me know

Anonymous
Not applicable
Author

Try using

     keepchar(@73:92,'1234567890,')as AMOUNT,

Instead of your REPLACE(@73:92,' ','') as AMOUNT,

Not applicable
Author

Thanks Bill!

It worked! No more spaces. Perfect!

But still cannot convert to number. Any ideas why?

Pls see attched. ! !

Anonymous
Not applicable
Author

Aaah!! 

Need to remove the comma as well.

     num(keepchar(@73:92,'1234567890'))  as AMOUNT,

aveeeeeee7en
Specialist III
Specialist III

Hi

Use this:

Purgechar(AMOUNT,',')

Regards

Av7eN