Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

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

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) ];
Highlighted
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) ];

 

Highlighted
Digital Support
Digital Support

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.