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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
EvanBarrick
Creator
Creator

Trim a String in Script

I have a field called 'ITEM'

There are certain 'ITEMS' that are in the data that I would like to trim the end of the string of characters in certain rows of data.

For example, 

ITEM

Salad

Salad - Regular

I want to trim the results where ITEM ends in ' - Regular' and just return 'Salad'

How can I do this in my load script?

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

load

Replace(ITEM, ' - Regular','') as Whatever

 

View solution in original post

1 Reply
m_woolf
Master II
Master II

load

Replace(ITEM, ' - Regular','') as Whatever