Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
LP27
Creator II
Creator II

Extract string within text in Qlik sense

Hi Qlikers,

Here is the scenario where I would need some idea's on- 

I have column Description in one Table and Vendor No in another Table.

example :-

Description Table

NoDescription
1R555-10034 Alter state 
2R777-10045 Change state
356785789907909

 

Vendor Table

Vendor No
10034
45654
23435
10045

So now I have to extract the string from Description Table if it contains the exact vendor No from Vendor Table.

Example : I need to create New Column as shown below-

NoDescription New Column
1R555-10034 Alter state 10034
2R777-10045 Change state10045
356785789907909-

 

Note : Only if Vendor No exist in the description Column it should add to new Column as shown above.

I have also tried this condition- if(wildmatch(Description, Vendor No),Vendor No). This did not work!

 

Let me know how to achieve this, have tried out my best! 

 

Thanks in Advance🙂

LP

1 Solution

Accepted Solutions
sunny_talwar

Try this

VendorMapping:
Mapping
LOAD [Vendor No],
	 '/'&[Vendor No]&'\';
LOAD * INLINE [
    Vendor No
    10034
    45654
    23435
    10045
];

Table:
LOAD *,
	 TextBetween(MapSubString('VendorMapping', Description), '/', '\') as [New Column];
LOAD * INLINE [
    No, Description
    1, R555-10034 Alter state 
    2, R777-10045 Change state
    3, 56785789907909
];

View solution in original post

2 Replies
sunny_talwar

Try this

VendorMapping:
Mapping
LOAD [Vendor No],
	 '/'&[Vendor No]&'\';
LOAD * INLINE [
    Vendor No
    10034
    45654
    23435
    10045
];

Table:
LOAD *,
	 TextBetween(MapSubString('VendorMapping', Description), '/', '\') as [New Column];
LOAD * INLINE [
    No, Description
    1, R555-10034 Alter state 
    2, R777-10045 Change state
    3, 56785789907909
];
LP27
Creator II
Creator II
Author

Wow! that solved my issue.

Thanks @sunny_talwar