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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is there anyway to strip off the text in a record after a comma?

Is there anyway to strip off the text in a record after a comma?  Example: ",Red Dog" and I just want "Red Dog"

1 Solution

Accepted Solutions
sivarajs
Specialist II
Specialist II

you can use

Subfield(fieldname,',',2)

View solution in original post

3 Replies
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You can do this with an index and a mid statement, assuming the string is in a field:

mid(FieldName, index(FieldName, ',', -1) + 1)

The QlikView help guide will give you full syntax definition of the Mid and Index functions.

Hope that helps,

Steve


sivarajs
Specialist II
Specialist II

you can use

Subfield(fieldname,',',2)

jagan
Partner - Champion III
Partner - Champion III

Hi,

You can use Subfield() as suggested by Sivaraj, if you further do not have any comma in your text.  If you have additional comma then use Mid() with Index() like below

=Mid(',Red Dog', Index(',Red Dog',',') + 1)

Hope this helps you.

Regards,

Jagan.