Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Master III
Master III

Please see the attached app

Untitled.jpg

View solution in original post

15 Replies
Highlighted
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

Highlighted
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);

Highlighted
MVP
MVP

Replace(Description, ' ','')

Highlighted
Master III
Master III

try

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


hth

Sasi

Highlighted
MVP
MVP

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 , ' ' )



Highlighted
Creator
Creator

Hi Manish

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

Highlighted
Creator III
Creator III

Hi,

find attachment

Highlighted
Master III
Master III

Try

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

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

hth

Sasi

Highlighted
MVP
MVP

try according to my 1st reply