Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
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
Kush
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) ];
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
Support (Former)
Support (Former)

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.