I am using an ifelse statement to check whether a text field starts with a specific phrase. I cannot seem to get this to work and my guess is that the space in the text field might be non standard (ie. transcoding issue?). If I use an AND statement to compare words in the phrase one at a time (extracted using SUBSTRING) then it works fine, but if I use a space anywhere it fails. Any ideas?
Copy/paste value from the data into the ifelse expression.
Thank you Tatyana. I had tried to copy the data from the preview table in data prep but this did not work. After your feedback I then went back to the source data in Excel, and the copy and paste does work from there.
You must us the string functions available in QS to remove unnecessary/unwanted spaces trim,ltrim and rtrim based on your requirements.
Trim won’t help here as the space is in the middle of a phrase. The issue is that the space must be a non standard space which makes my ifelse statement fail to match against the string.