Discussion Board for collaboration on QlikView Scripting.
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!
trim(subfield(yourfield,',',2))&' '&subfield(yourfield,',',1) as yournewfield
Capitalize(subfield(trim(Name),',',2)) &' '& Capitalize(subfield(trim(Name),',',1)) as New_Name
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
Three helpful for you, Would you close this thread