Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using this formula in Excel to remove a leading white space :
TRIM(SUBSTITUTE(A2,CHAR(160),CHAR(32)))
Is there a similar function to do this in Qlikview. I have tried a simple LTRIM but this doesn't seem to work.
Many thanks.
Phil
Hi Phil,
Can you try some of these:
You can try to combine these functions also.
Good Luck
You can use
=Trim( FieldName )
Try this
PurgeChar(A2, Chr(160)&Chr(32))
Try this:
PurgeChar(A2, Chr(160)&Chr(32))
thanks,
ashwini
An even more complete reproduction of the Excel function Trim uses MapSubString to replace series of spaces. But this is only usable in your Load Script...
MapMultiSpace:
MAPPING
LOAD Repeat( ' ', RowNo()+1) AS Index, ' ' AS Replacement
AUTOGENERATE 9;
LOAD
:
Trim( MapSubString( 'MapMultiSpace', Replace( A2, Chr(160), ' ' ))) AS CorrectedA2,
:
FROM ...;
Best,
Peter
Hi Sunny,
What are the characters defined by Chr(160) and Chr(32) ?
Is that spaces or any special characters?
Any link you to get more info on this?
Thanks,
Joy
chr(32) is space.
chr(160) is non-breaking space.
If you want to find out about other characters represented by numbers between 0 and 65535, check any on-line Unicode table. Like this one: