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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
andymanu
Creator II
Creator II

Selecting alphabetical letters from a mix of letters and numbers

Hi,

I got a filed named "ITEM_CODE" which got both numbers and alphabetic letters in it.

I need to filter the data rows which only got letters.

Please find a sample data set load code below,

Table:

Load * Inline [

Item_Code, Item_Name

CBDGHD, A

124567,C

DEFAFD,D

243671,E

147568, H

ABDPOL,G

]

Appreciate if anyone could propose me a method to filter only the rows which got alphabet letter ( according to the scenario 3 instances) from the entire data set.

Awaiting for your reply.

Thanks in advance

Regards,

Andy

11 Replies
andymanu
Creator II
Creator II
Author

Hi,

Need a small favor.

Assume if I want to Flag the fields which got numbers,=. I used the below code but it flagged all the data rows as "0".

The code used was,

   

Table:

LOAD

    Item_Code,

    Item_Name,

    If(Text(PurgeChar(Item_Code, '0123456789')),1,0) as Flag

    FROM (Data Source);


Could you please correct me with the above issue?

Thank you in advance.

Regards,

Andy

andymanu
Creator II
Creator II
Author

Hi,

Sorry for the disturbance.

Got the solution. I was referring to the wrong syntax.

It should be;

If(Num(Item_Code, '0123456789'),1,0) as Flag"

Now it is working.


Thanks

Regards,

Andy