Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to remove the data with special character?

Hi Community,

I have sample data for Product Id

Product Id

A02

A02-101

A02-102

A02-104

A03

A04

A05

A05-101

A05-103

A06

A06-101

A06-102

A07

How I remove all data which is present with special character '-'.

Expected output -

Product Id

A02

A03

A04

A05

A06

A07

Thanks in advance.

1 Solution

Accepted Solutions
effinty2112
Master
Master

Hi Ishwar,

Try:

Data:

LOAD * WHERE Not WildMatch([Product Id],'*-*');

LOAD * INLINE [

    Product Id

    A02

    A02-101

    A02-102

    A02-104

    A03

    A04

    A05

    A05-101

    A05-103

    A06

    A06-101

    A06-102

    A07

];

Giving

Product Id
A02
A03
A04
A05
A06
A07

Regards

Andrew

View solution in original post

9 Replies
Anil_Babu_Samineni

This?

LOAD SubField(Field, '-', 1) as Field Inline [

Field

A02

A02-101

A02-102

A02-104

A03

A04

A05

A05-101

A05-103

A06

A06-101

A06-102

A07

];

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi Anil,

Thanks for your quick reply I have already I tried this option but this option not remove data with present with special character 

Anil_Babu_Samineni

Please provide with some special characters too

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi Anil,

I have used same expression data shows without special character but it also capture special character data

e.g.

SubField(Product Id, '-', 1)             Capture data

A02                                                   A02

                                                         A02-101

                                                         A02-102

                                                         A02-104

here SubField() function shows A02 but it capture remaining three code data of special character.

I want only  A02 product code data

e.g.

SubField(Product Id, '-', 1)             Capture data

A02                                                   A02

It should not capture other three product data that is my expected output.

Is the any other solution?                                                 

Anil_Babu_Samineni

Are you not looking this?

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
effinty2112
Master
Master

Hi Ishwar,

Try:

Data:

LOAD * WHERE Not WildMatch([Product Id],'*-*');

LOAD * INLINE [

    Product Id

    A02

    A02-101

    A02-102

    A02-104

    A03

    A04

    A05

    A05-101

    A05-103

    A06

    A06-101

    A06-102

    A07

];

Giving

Product Id
A02
A03
A04
A05
A06
A07

Regards

Andrew

shraddha_g
Partner - Master III
Partner - Master III

Try these condition while loading data

where Len([Product Id]) =3

else

where not wildmatch([Product Id],'*-*')

Anonymous
Not applicable
Author

Hi Andrew,

I used your  solution and  I got answer.

Thanks

Anonymous
Not applicable
Author

Thanks Shradhha,

I got the answer