Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
kulwantsaj219
Contributor II

Data quality

Hi All,

i have a column called name. it contain "firstname midname lastname".

Problem is that spaces between "firstname midname lastname" is not even. e.g. first (two spaces) mindname (one space)lastname.

how to make the spaces even(only one space between "firstname midname lastname")

1 Solution

Accepted Solutions

Re: Data quality

May be this

Replace(name, '  ', ' ') as name

View solution in original post

4 Replies

Re: Data quality

May be this

Replace(name, '  ', ' ') as name

View solution in original post

kulwantsaj219
Contributor II

Re: Data quality

thanks for your reply. already got the same solution 

kathleene
New Contributor III

Re: Data quality

Hello - you could also try this. 

SubField(Name,'  ',1)&' '&SubField(Name,'  ',2)

vkhassanov
New Contributor II

Re: Data quality

For any number of spaces inside:

Left(name,Index(name,' ')-1) & ' ' & Trim(Mid(name,Index(name,' '),Index(name,' ',-1)-Index(name,' '))) & ' ' & Trim(Right(name,Len(name)-Index(name,' ',-1)))