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 Values in Load Script

Hi,

 

I have a field that has numerical values and combination of Alphabets and Numericals.

 

Example:

457362

A628408

8357832

B7532805

V283755

 

How do I load only rows with numbers and not the combination?

 

Output:

 

457362

A628408

8357832

B7532805

V283755

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

try below

Data:
Load *
where Flag=1;
Load *,
if(isnum(if(len(trim(KeepChar(Field,'0123456789')))>0,KeepChar(Field,'0123456789'))) and 
istext(if(len(trim(KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')))>0,
KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'))),1,0) as Flag Inline [
Field
123
ABC
12BC ];

View solution in original post

6 Replies
Kushal_Chawda

Try below

Data:

load *

FROM Source

Where isnum(Field);

qlikwiz123
Creator III
Creator III
Author

Is there a way to filter number-character values and only bring Alphabetical Strings?

Thought I could use IsText(Field) but that returns -1 even for number-character values

Kushal_Chawda

Try below

Data:

load *

FROM Source

Where not isnum(Field);

qlikwiz123
Creator III
Creator III
Author

Hi, 

 

This is not working, It shows both Text and Text-Number Combination values

Kushal_Chawda

what was your original requirement ? Was it not to filter just number?

Kushal_Chawda

try below

Data:
Load *
where Flag=1;
Load *,
if(isnum(if(len(trim(KeepChar(Field,'0123456789')))>0,KeepChar(Field,'0123456789'))) and 
istext(if(len(trim(KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')))>0,
KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'))),1,0) as Flag Inline [
Field
123
ABC
12BC ];