Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change field from "lastname, firstname" to "firstname lastname"

Hi,

I am new to Qlik and trying to change the format of a field. Any help is greatly appreciated as I learn the Qlik expressions.

I have a field that contains names like:               Smith, Ted

I would like to change that field so it reads:        Ted Smith

What is the best expression to use?

Thanks for the help!

4 Replies
Anonymous
Not applicable
Author

trim(subfield(yourfield,',',2))&' '&subfield(yourfield,',',1) as yournewfield

Kushal_Chawda

Capitalize(subfield(trim(Name),',',2)) &' '& Capitalize(subfield(trim(Name),',',1))  as New_Name

parul_mehta
Partner - Creator
Partner - Creator

Check this

LOAD Name,
Capitalize(Name) as Name1,
SubField(Capitalize(Name), ',' , 2)& ' ' & SubField(Capitalize(Name), ',' , 1) as Name2
FROM
[..\Book1_try.xlsx]
(
ooxml, embedded labels, table is Sheet3);

Capitalize will convert the string to First letter as Caps, rest Small

Sub Field to pick up string at position 1, and 2

Please refer to the attached document for string fucntions

Anil_Babu_Samineni

Three helpful for you, Would you close this thread

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)