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

I am having the Special Character as '-' and i need to replace it with the word in qlik View

I am having the Special Character as '-' and i need to replace it with the 'Sample' in qlik View in script level

1 Solution

Accepted Solutions
afsarshaikh
Creator
Creator

Can you try,

Replace your Extension field with:

if([Extension]= '-', 'No Ext', [Extension]) as Column_Name_Alias

Regards,
Afsar Shaikh
Project Manager- QlikView Dev. & Support
Afsar Shaikh
Email- afsar.shaikh@live.com

View solution in original post

25 Replies
suryaa30
Creator II
Creator II

Replace('abccde','cc','xyz')Returns 'abxyzde'

Qlik example   cc is replaced by xyz

Replcae('-','Word')

sunny_talwar

May be this

Replace(FieldName, '-', 'Sample') as FieldName

Anonymous
Not applicable
Author

Hi ,

I am having the Field Name Ext in that i am having some value as '-' , so i need to replace it with 'No Ext'

vishsaggi
Champion III
Champion III

Did you try Sunny's Expr?

Replace 'sample' with 'No Ext'

suryaa30
Creator II
Creator II

You can use null handling if that's a null value. You can do it at script

level using null to value or by checking the length = 0.

In chart you go to presentation tab to show null as NoEXt

On Fri, 8 Sep 2017 at 1:11 AM, lakshminarayanan jaganathan <

Anonymous
Not applicable
Author

  Current Field Value :    

Extension
-
201
202
222
200
-
-
-
-

  Expected Field Values:

Extension
No Ext
201
202
222
200
No Ext
No Ext
No Ext
No Ext
vishsaggi
Champion III
Champion III

Yes did you try Sunny's expr like

LOAD yourfieldnames,

           Replace(Extension, '-', 'No Ext') AS Extension

FROM Yoursource;

Anonymous
Not applicable
Author

I need to change the value within the field not in new field

Anonymous
Not applicable
Author

hi sunny,

if i want to replace a single record then what should i do?

because i tried  Replace(name,'_','r') as new and it works but it changes entire column of data.

Thank you