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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
soha1902
Creator
Creator

How to remove special character?

Hi All,

I want to remove last two character from my field.

I know, I need to use PurgeChar() but the problem is, I don't know how to type this character.

Please find below image for clarification.

Remove.png

Please help me regarding this.

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

To exclude last two chararcters, try like:

=Left('ABCDE',Len('ABCDE')-2)

You can replace ABCDE by your field name.

View solution in original post

2 Replies
tresB
Champion III
Champion III

To exclude last two chararcters, try like:

=Left('ABCDE',Len('ABCDE')-2)

You can replace ABCDE by your field name.

its_anandrjs
Champion III
Champion III

You can try like below load script if in the fields it is last 2 words

Load

Mid(FieldName,1,len(FieldName)-2) as Newfield

From Location;

Or you can use purge char also.

See the small example

LOAD Site,Word, mid(Word,1,len(Word)-2) as NewWord;

LOAD * Inline

[

Site,Word

a,23fd

b,45fdsf

c,3fsdf

d,56fdsf

e,566fsdf

];

And you get in field NewWord

23
3fs
56fd
566fs
45fd