Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use PurgeChar along with string function

Hello,

I am new to QlikView and i have to develop a report which gives pure data without any special char.

I do not want any blanks/any junk nor the numeric. Only characters is required.

Could anyone please help me on this.

Thank you,

Regards,

Sandhya

1 Solution

Accepted Solutions
sunny_talwar

May be just this

KeepChar(FieldName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') as FieldName

View solution in original post

14 Replies
sunny_talwar

May be just this

KeepChar(FieldName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') as FieldName

qlikview979
Specialist
Specialist

Hi,

Please provide your sample data with expected output

Not applicable
Author

Hello Sunny,

Thanks for your response.

I tried with this syntax KeepChar(FieldName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') as FieldName, but it returns the junk value which I do not require.

So I tried in other way KeepChar(FieldName, '!!!,###,***,$$$,12345,()()()')) as FieldName and think so it is working. but dont know is this the correct way of using the function.


Thank you,


Regards,

Sandhya

Not applicable
Author

Hello Mahesh,

I am initially trying this on one field (say Customer Name) and I want to have pure data without any special character

for example: Mahesh Kumar is Pure data... but ####Mahesh****!!!Kumar is data with special characters.

Hope I am able to provide you with the details of what I am looking for.

Thank you,

Regards,

Sandhya

qlikview979
Specialist
Specialist

Hi Sanghya,

Sorry for delay...

T1:

LOAD

KeepChar([Customer Name],'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz');

LOAD * Inline [

Customer Name

####Mahesh****!!!Kumar

Sandhya###Japtap&%(@&#&%

];



Result:-

MaheshKumar

SandhyaJaptap



Regards


Not applicable
Author

Hello Mahesh,

Thanks for the response. Using KeepChar function, I am able to get the result however there is one problem in using this function we are not able to get the char and number combination data.

for example: Amit1234 is a pure data but how to get this using keepchar or purge char is a problem

Could you be able to help in this.

Thank you,

Regards,

Sandhya

qlikview979
Specialist
Specialist

Hi sandhya,

keepchar(Amit1234,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz') //


it will give result       Amit

purgechar(Amit1234,'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')


it will give result       1234


regards

mahesh

Not applicable
Author

hello mahesh,

Thanks for your response. I am still not getting the correct answer. below is my data

  out of which I want pure data for example ('Dustin Graves', 'Ashish','Sandhya',Amit1234') only. the other data including special character and only numbers should not be considered. Using PurgeChar and KeepChar, I am not able to get the combination of char and numbers. Could you be able to help here how to get this done.

Thank you,

Regards,

Sandhya

123Art Johnson,III
Dustin Graves
!!!$%VALMONT INDUSTRIES, INC.
PACCAR####
CTC-Suite Renovation Program-1x4
&&&*****Unknown****
****CRM****####
12345 JCI project. 57 Luxor 300 156 Luxor 600
AAP !!!####%%%%&&&
****AAMCOR ***
123134343424542sasdsfpoi*******
Ashish

423165

Amit1234

qlikview979
Specialist
Specialist

Hi Sandhya,

can you please share the Input and Required output,that is easy for me in excel.