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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register 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 (1)
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 ];