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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
MIKIEMILLER
Contributor III
Contributor III

Remove everything after 2nd space

I feel this is an easy question, but cannot seem to figure out the answer.  How would you get rid of all the characters after the second space?

[Field Name]

JP Smith (Micheals) Market

T Warner Market

A Phillips (Hounds) Farms

Kelley Williams Tower

So it would look like this

[Field Name]

JP Smith

T Warner

A Phillips

Kelley Williams

Thanks

1 Solution

Accepted Solutions
andrey_krylov
Specialist
Specialist

Hi Matt. Try this

Left([Field Name], Index([Field Name], ' ', 2))

View solution in original post

2 Replies
andrey_krylov
Specialist
Specialist

Hi Matt. Try this

Left([Field Name], Index([Field Name], ' ', 2))

Jesh19
Creator II
Creator II

Try this.

If you want at the script level, try the below expression.

=Left('FieldName',Index('FieldName',' ',2))