Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to hide the junk characters

Hello Everybody,

In a List box I am trying to display Name of the people, bec's of some bad inputs(in the source) its showing as a square box, my aim is I would like to hide the square box and display only names

Is it possbile...

In the below I would like to hide the junk value and display only names


€

‚
ƒ
„
…
†
‡
œ

Kumar
Santa
ANDREA
ANTHONY
ARUN
Balasub

Regards

Chriss Mervin

1 Solution

Accepted Solutions
its_anandrjs

Hi Chriss,

From my side the square symbols are ones which are unknown symbols and characters.

For this is suggest use ascii charts to find out the Dec value of the character and then filter it from the data base then this fileter is filtered out from the records it is the only way as you say the length is 1 and 10 for this

=if(Len(purgechar(COL,'�')) >1 and

     Len(purgechar(COL,'&#0123456789;')) <>10 ,purgechar(COL,'&#0123456789;') )

To remove symbol use

Example:-

=if(Len(purgechar(COL,'&#0123456789;')) >1 and

     Len(purgechar(COL,'&#0123456789;')) <>10 and

     COL <> Chr( 255 )   ,purgechar(COL,'&#0123456789;') )

But in this case if any usefull numbers which has length 1 and 10 will also remove from by the filter so use it carefully.

Let me know about this.

HTH

Rgds

Anand

View solution in original post

11 Replies
its_anandrjs

Hi,

Use Purge char function to remove the squares and the wrong values character like

purgechar ( )

Use like this for list box

Purgechar(COL,'&#123456789;')

Rgds

Anand

its_anandrjs

Hi,

Use some thing like this in the list box expression

=if(Len(purgechar(COL,'&#0123456789;'))>0,purgechar(COL,'&#0123456789;'))

See the attached samlpe file

Rgds

Anand

Not applicable
Author

Dear Anand,

Thanks for your reply but still its not removing the junk characters.

Regards

Chriss Mervin

its_anandrjs

Hi,

Thanks do you have any sample file or if you add a symbol into the purgechar( ) function then you get correct answer.

Rgds

Anand

Not applicable
Author

Dear Anand,

Please find the attached error ..

Regards

Chriss Mervin

test.bmp

its_anandrjs

Hi Chriss,

I assume there is only one symbol that i see on your attched error file, I suggest do one thing check the lengh of this symbol and filter this records from the list box by the condition check the length like.

Len( Your field )

and share the snapshot also.

Rgds

Anand

Not applicable
Author

Dear Anand,

Thanks again, I found the length of the Junk value its 1 and 10.

Can you tell me how to proceed further

Regards

Chriss Mervin

test.bmp

its_anandrjs

Hi Chriss,

From my side the square symbols are ones which are unknown symbols and characters.

For this is suggest use ascii charts to find out the Dec value of the character and then filter it from the data base then this fileter is filtered out from the records it is the only way as you say the length is 1 and 10 for this

=if(Len(purgechar(COL,'&#0123456789;')) >1 and

     Len(purgechar(COL,'&#0123456789;')) <>10 ,purgechar(COL,'&#0123456789;') )

To remove symbol use

Example:-

=if(Len(purgechar(COL,'&#0123456789;')) >1 and

     Len(purgechar(COL,'&#0123456789;')) <>10 and

     COL <> Chr( 255 )   ,purgechar(COL,'&#0123456789;') )

But in this case if any usefull numbers which has length 1 and 10 will also remove from by the filter so use it carefully.

Let me know about this.

HTH

Rgds

Anand

Not applicable
Author

Dear Anand,

Its perfectly works, can you explain the code for my learning...

Thanks a lot....

Chriss Mervin