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: 
nihhalmca
Specialist II
Specialist II

Sub string

Hi All 

I need to get 4 letter code from string.

For example:

10 XXXX (22P1)

44L1

5555

20 XXX XXXX(44C5)

Expected Result :

22P1

44L1

5555

44C5

 

Thank you.

Labels (2)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Table:
load coalesce(TextBetween(ID_text,'(',')'),ID_text) as ID inline [
ID_text
10 XXXX (22P1)
44L1
5555
20 XXX XXXX(44C5)
];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

3 Replies
BrunPierre
Partner - Master II
Partner - Master II

Maybe this

If([String Field] Like '*X*', TextBetween([String Field],'(',')'),[String Field]) as [Transformed Field]

vinieme12
Champion III
Champion III

Table:
load coalesce(TextBetween(ID_text,'(',')'),ID_text) as ID inline [
ID_text
10 XXXX (22P1)
44L1
5555
20 XXX XXXX(44C5)
];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
nihhalmca
Specialist II
Specialist II
Author

Thanks, its working.