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

25 Replies
vishsaggi
Champion III
Champion III

Ok are you expecting this?

Capture.PNG

vishsaggi
Champion III
Champion III

Try this? Are you looking for this?

Table1:

LOAD EmpID,

     [Last Name],

     [First Name],

     Title,

     HireDate,

     Office,

     IF(Extension = '-' OR Len(Trim(Extension)) = 0, 'No Ext', Extension) AS Extension,

     [Reports To],     

     YearSalary,

     Bonus,

     RowNo() AS RowNum

FROM

[..\..\Downloads\EmpOff.xls]

(biff, embedded labels, table is Employee$);

LET vRowCount = FieldIndex('Extension', 'No Ext');

NoConcatenate

Final:

LOAD EmpID,

     [Last Name],

     [First Name],

     Title,

     HireDate,

     Office,

     RowNum,

     IF(Extension = 'No Ext' AND RowNum <> $(vRowCount), '-', Extension) AS Extension ,

     [Reports To],

     YearSalary,

     Bonus

    

Resident Table1;

DROP Table Table1;

Capture.PNG

Anil_Babu_Samineni

You are not getting as expected still? May be try a luck

Set Nullinterpret = '-';

NullasValue Extension;

Set NullValue = 'No Ext';

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
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
Anonymous
Not applicable
Author

Yes Vishwarath

vishsaggi
Champion III
Champion III

OK did you try code then?