Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Am new to Qlikview. Could you explain KeepChar and PurgeChar?

Could you explain Keep Char and Purge Char?

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

KeepChar(Field,Characters) - As a name suggest it is used to keep the specified characters from the supplied field.

Purgechar(Field,Characters) - As a name suggest it is used to purge the specified charcters from the supplied field.

For more help check below links.

String functions ‒ QlikView

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anil_Babu_Samineni

Please do Practice creating Inline Table?

Load *, KeepChar(FieldName, '!@#123') as KeepChar,PurgeChar(FieldName, '!@#123') as PurgeChar  Inline [

FieldName

1234ABCD

!@@#$ABCD1234

];

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
Siva_Sankar
Master II
Master II

Pandiri priyanka,

KeepChar() returns a string consisting of the first string, 'text', less any of the characters NOT contained in the second string, "keep_chars".

KeepChar(text, keep_chars)

PurgeChar() returns a string consisting of the characters contained in the input string ('text'), excluding any that appear in the second argument ('remove_chars').

PurgeChar(text, remove_chars)

1.JPG