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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading in number string without preceeding characters

Hi I'd like to know how to load in a series of numbers from a field without the proceeding characters. For instance I have

Sales :

$35666

£50000

(6788

)89998

I want to return the list so that it only loads in the numbers ie :

35666

50000

6788

89998

Labels (1)
5 Replies
marcus_sommer
MVP
MVP

You could use: keepchar(Sales, '0123456789') as Sales.

- Marcus

sunny_talwar
MVP
MVP

Or this:

Right(Sales, Len(Sales) - 1)) as Sales

Not applicable
Author

Thanks - would this work correctly even if one the values didnt contain any characters or will always remove the first character ?

marcus_sommer
MVP
MVP

It will always remove the first character. The above mentioned keepchar-function will with these parameter only return numeric chars. If your data are more different then that then you should post more of them.

- Marcus

sunny_talwar
MVP
MVP

This will always remove the first character.

You can do this if you don't want to remove in case the first character is a number

If(IsNum(Left(Sales, 1)), Sales, Right(Sales, Len(Sales) - 1))) as Sales