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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading part of a feild

Hi All,

I have a FullName feild where the names are formatted as follows:

Crab, Peter

On load I want to split this feild into two, one called FirstName and the other called SecondName.

Thanks

JB

1 Solution

Accepted Solutions
biester
Specialist
Specialist

I would do it this way:

subfield(NAME,',',1) as SecondName, trim(subfield(NAME,',',2)) as FirstName





View solution in original post

3 Replies
Not applicable
Author

Hi JB,

You can use;

For First Name --> Left(Field1,Index(Field1,',')-1)

For Last Name --> Mid(Field1,Index(Field1,',')+1,Len(Field1)-Index(Field1,','))

Here "Field1" is your "Name Field"

Regards

Rajesh

biester
Specialist
Specialist

I would do it this way:

subfield(NAME,',',1) as SecondName, trim(subfield(NAME,',',2)) as FirstName





Not applicable
Author

Subfeild worked a treat, thank you!

JB