Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
sayadutt
Creator
Creator

Truncating trailing 2 spaces from a field

HI,

i have a list where few values have 2 traling spaces while others don't.

how can I write a generalized code at the time of loading, which will delete the 2 trailing spaces (at end) if applicable else ignore.

Thanks

14 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

try with this and see.

Replace([Associate Working On],' ','') as Test2;


or you can store data in qvd and apply thees formulas while reading data from qvd.


Regards

ASHFAQ

tresesco
MVP
MVP

Try:

set Verbatim = 0;    // before your load statement.

MarcoWedel

Hi,

QlikCommunity_Thread_130709_Pic1.JPG.jpg

hope this helps

regards

Marco

jonathandienst
Partner - Champion III
Partner - Champion III

Sayantan Dutta wrote:

But the moment I do load from SharePoint, 2 extra spaces are getting added at the end, and they are not getting truncated using Trim.

Then they could be non-breaking spaces (unicode char 0xA0 (160)).

     PurgeChar([Associate Working On], chr(160)) as Test  

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MarcoWedel

Try

=Ord(Right([Associate Working On],1))

to get the ascii code of the character:

QlikCommunity_Thread_130709_Pic2.JPG.jpg

hope this helps

regards

Marco