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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show only numbers

Hi All

I have field with values both numbers and text but I want to show only numbers from that.

How can I achieve the same.

Thanks for the help

Labels (1)
14 Replies
sasiparupudi1
Master III
Master III

Hi

Your solution wouldnt work if the data contains special characters like & @

ex: &A1234

where as keepChar('&A1234','0123456789') would always keep only the numbers in a string

Not applicable
Author

Sorry for not explained well. I have field values like.. abc123, abc, xyz1234, xyz etc...

Need to create two fields as Number and Name

Required o/p

Number - 123,1234

Name- abc,xyz

Not applicable
Author

Sorry for not explained well. I have field values like.. abc123, abc, xyz1234, xyz etc...

Need to create two fields as Number and Name

Required o/p

Number - 123,1234

Name- abc,xyz

sunny_talwar

Try this:

LOAD *

          KeepChar(FieldName, '0123456789') as Number

          PurgeChar(FieldName, '0123456789') as Name

Resident xyz;

Not applicable
Author

thanks sunny