Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
Creator III
Creator III

Filter Text and Aphanumeric values from a field

Hi, I have a field similar to

Data

------

ABC

ABC (V645)

DHFE

Corporate

AWS (A598234)

Stock

BCC (V10)

 

How do I separate Text and Alphanumeric values into two different fields in the script?

 

I tried IsNum and Istext but they did not work

Labels (3)
3 Replies
Kushal_Chawda

Data:
Load *,

if(not isnum(if(len(trim(KeepChar(Field,'0123456789')))>0,KeepChar(Field,'0123456789'))) and 
istext(if(len(trim(KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')))>0,
KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'))),Field) as Text,

if(isnum(if(len(trim(KeepChar(Field,'0123456789')))>0,KeepChar(Field,'0123456789'))) and 
istext(if(len(trim(KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')))>0,
KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'))),Field) as AlphaNumeric 
Inline [
Field
ABC
ABC (V645)
DHFE
Corporate
AWS (A598234)
Stock
BCC (V10) ];
Frank_Hartmann
Master II
Master II

 

Data:
Load *,
	if(len(TextBetween(Data,'(',')'))>0,Data,null()) as  AN,
	if(len(TextBetween(Data,'(',')'))=0,Data,null()) as  Text;
Load *
Inline [
Data
ABC
ABC (V645)
DHFE
Corporate
AWS (A598234)
Stock
BCC (V10) ];

 

Brett_Bleess
Former Employee
Former Employee

You have received two responses to your post, we would greatly appreciate it if you would close out the thread by using the Accept as Solution button on the post(s) that helped.  If neither did help, please leave an update post on what you still need.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.