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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to remove unwanted characters

Hi,Experts.

I want remove unwanted characters in my data.My data is below manner

  

sidSNO
TT23471
RT76388_AW42
HR342344-YUE3
TY2564 (YRU_34)4
JKA4242(TR56)5
UJ673836
YR567847

My output of above table is like this

  

sidSNO
TT23471
RT763882
HR3423443
TY2564 4
JKA42425
UJ673836
YR567847

Please give  me a solution.

Thanks in advance.

1 Solution

Accepted Solutions
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi ,

Try Below

=Subfield(Subfield(SubField(sid,'-',1),'_',1),'(',1)

Thanks,
Arvind Patil

View solution in original post

5 Replies
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Suman,

Please use d Sub filed three time  function like below:

1. Step1

Subfield(sid,'_',1),

2. =Subfield(sid,'-',1),


3 .Subfield(sid,'(',1),


Thanks,

Arvind Patil

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi ,

Try Below

=Subfield(Subfield(SubField(sid,'-',1),'_',1),'(',1)

Thanks,
Arvind Patil

Anonymous
Not applicable
Author

Thanks Arvind.

Its working.You  give a good suggestion.

sunny_talwar

This might be another way to do it. It also gives you the option to add more characters.

Table:

LOAD *,

FindOneOf(sid&'(', '_-(') as CharacterToFind,

Left(sid, FindOneOf(sid&'(', '_-(')-1) as ReqSid;

LOAD * INLINE [

    sid, SNO

    TT2347, 1

    RT76388_AW4, 2

    HR342344-YUE, 3

    TY2564 (YRU_34), 4

    JKA4242(TR56), 5

    UJ67383, 6

    YR56784, 7

];


Capture.PNG

Anonymous
Not applicable
Author

Thanks sunny.

You give me good suggestion.