Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

String functions to extract only Initials from Full name

I need only First letter from First Name, Last Name & Initial. Is there any way I can create a new field like that. I tried some string functions too.

Eg: Li Xiao Ping is the my field name (Full Name)

     I want like LXP as Initials (as seperate field)

1 Solution

Accepted Solutions
Highlighted
Specialist II
Specialist II

9 Replies
Highlighted
Specialist II
Specialist II

Highlighted
Specialist II
Specialist II

    keepchar([Full Name],'ABCDEFGHIJKLMNOPQRSTUVWXYZ')

Name initials

Highlighted
Creator II
Creator II

Please try this

=left(subfield(name,' ',1),1)&left(subfield(name,' ',2),1)&left(subfield(name,' ',3),1)

Highlighted
MVP
MVP

Using capitalize() would be a bit more robust, like:

keepchar( Capitalize([Full Name]),'ABCDEFGHIJKLMNOPQRSTUVWXYZ')

Highlighted
Master
Master

You probably need to use SubField function with the separator being a space.  Hopefully your data is consistent that way.

The formula that Sumanta gave you looks like it would work if your data is good.

Put this in your script in the Load portion and add AS fieldname to the end.  Then this new field will be available to the app without having to recalculate each time in the app.

Highlighted
Partner
Partner

Can you please close the thread by marking the right answer as so if your question has been answered?

I assume It has.

Highlighted
Partner
Partner

Thanks for the reply @Varun. I forgot mention that the values in the field are fully in capital letters.

Eg: LI XIAO PING


Otherwise, your solution is perfect

Highlighted
Partner
Partner

Thanks @Sumanta. Your solution works for me. Thanks. Since, I didn't mentioned that all the characters in the filed are in capital letters. I marked @Varun ans as correct.

Anyways, your solution resolved my case. Thanks @Sumanta 🙂

Highlighted
Partner
Partner

Sure omarbensalem‌. Thanks