Discussion Board for collaboration related to QlikView App Development.
I have a string/name say Xavier, Saritha. I need to only the part Xavier, S. How can we achieve this in Qlikview. Someone please help me.
something like the below should work for you.
Subfield(field,',',1) & ', ' & Left(Trim(Subfield(field,',',2)),1) & '.' As newfield
hope that helps
View solution in original post
If you have the name in a field called Name:
Left(Name, Index(Name, ',')+2)
you can format strings with these functions: left, mid ,right and subfield
depends on what your data looks like choose the most suitable
in your case it would probably be subfield:
subfield(FieldName, ',', 1) for left of comma
subfield(FieldName, ',', 2) for left of comma
=SubField('Xavier, Saritha',',',1)&','& mid(trim(SubField(' Xavier, Saritha',',',2)),1,1)
Thanks Joe , Subfield(field,',',1) & ', ' & Left(Trim(Subfield(field,',',2)),1) & '.' As newfield gave me the solution. even if space is there after ',' the result is correct. Thank you .
no worries glad to help