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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_deschle
Contributor II
Contributor II

Cutting a string into pieces

Hi community,

I am trying to do something in Qlik that I've been used to do in Excel.

Our erp has searchnames for articles that we have standardized, meaning exactly first 7 characters product name, then type of product (variable length),  "-" and further information, like
NAMEISAtype1-long
NAMEISBtype2-short
NAMEISCtype23-shortest

How should the formula in the editor look so I have a new field "producttype"? In the example this would contain
type1
type2
type23

In Excel I would use the search-function for the position of the "-" and cut off the rest with left and right. Couldn't find something similar in the data editor.

Thanks for your help.

1 Solution

Accepted Solutions
Taoufiq_Zarra

@thomas_deschle 

Serveral options, one :

=textbetween('-'&mid(Field,8),'-','-')

 

output:

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

@thomas_deschle 

Serveral options, one :

=textbetween('-'&mid(Field,8),'-','-')

 

output:

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
thomas_deschle
Contributor II
Contributor II
Author

Thank you Taoufiq! Works 😀.