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: 
Not applicable

Read string untill blank space

Greetings!

Simple question:

I have a string such as "THIAGO RIBEIRO", and I want to treat it to outcome like "TRIBEIRO"...

I tried something like LEFT(NAME,1) & RIGHT(NAME,' '), but unsuccesfuly...

Can anyone see where I'm going wrong in the RIGHT func?

Thx again!!!

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Functions left and right take the specific number of characters that should be included...

For your needs, function SUBFIELD would work better:

Part1 = SUBFIELD(Name, ' ', 1)

Part2 = SUBFIELD(Name, ' ', 2)

For the purpose of extracting first initial and last name, use a combination of the two:

left(Name,1) & SUBFIELD(Name, ' ', 2)

cheers,

Ask me about Qlik Sense Expert Class!

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Functions left and right take the specific number of characters that should be included...

For your needs, function SUBFIELD would work better:

Part1 = SUBFIELD(Name, ' ', 1)

Part2 = SUBFIELD(Name, ' ', 2)

For the purpose of extracting first initial and last name, use a combination of the two:

left(Name,1) & SUBFIELD(Name, ' ', 2)

cheers,

Ask me about Qlik Sense Expert Class!
Not applicable
Author

Oleg,

Owe you another one... Worked perfectly!

Thank you so much!