Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
madhubabum
Creator
Creator

How to remove spaces in middle of the Field ?

Hi experts

I want to remove the spaces in middle of the field values.

I am attaching the sample excel file and Application

Thanks

Madhu

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

Please see the attached app

Untitled.jpg

View solution in original post

16 Replies
SreeniJD
Specialist
Specialist

Try this,

Replace the space with let say ","

=replace(Description,' ',',')

and check the string if there are multiple commas between text then trim that...

HTH,

Sreeni

MK_QSL
MVP
MVP

SpaceMap:

MAPPING LOAD repeat(' ', RecNo()), ' '

AutoGenerate 125;

Employee:

LOAD Emp_Id,

     Emp_Name,

    Description as Description1,

     MapSubString('SpaceMap', trim(Description)) as Description

FROM

[Book1 (1).xlsx]

(ooxml, embedded labels, table is Sheet1);

tresesco
MVP
MVP

Replace(Description, ' ','')

sasiparupudi1
Master III
Master III

try

Replace(Description,'  ','')  as NewDescription


hth

Sasi

petter
Partner - Champion III
Partner - Champion III

If you want to reduce multiple consecutive spaces between words and have only a single space you could:

Replace(Description, Repeat( Chr(32) , 2 ) ,'')


or if you want to remove spaces entirely:


PurgeChar( Description , ' ' )



madhubabum
Creator
Creator
Author

Hi Manish

I am attaching sample Excel , Output , Application files as following

ChennaiahNallani
Creator III
Creator III

Hi,

find attachment

sasiparupudi1
Master III
Master III

Try

Replace(Description,'  ','')  as NewDescription

Replace(Replace(Replace(Description,'  ',''),Chr(10),' '),Chr(13),' ')  as NewDescription

hth

Sasi

MK_QSL
MVP
MVP

try according to my 1st reply