Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am having the Special Character as '-' and i need to replace it with the 'Sample' in qlik View in script level
Ok are you expecting this?
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;
You are not getting as expected still? May be try a luck
Set Nullinterpret = '-';
NullasValue Extension;
Set NullValue = 'No Ext';
Can you try,
Replace your Extension field with:
if([Extension]= '-', 'No Ext', [Extension]) as Column_Name_Alias
Yes Vishwarath
OK did you try code then?