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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shahafei2
Creator
Creator

Load if contain... as

Hi all,

 

Im trying to rename a value IF it contains 'ABC'

for the example i have the following values 

 

1-ABC-2

2-ABC-3

ABC-4

5-ABC

bbbb

cccc7

 456456etda

And i would like that the marked values will be changed to '1' so instead i will receive

1

1

1

1

bbbb

cccc7

 456456etda

 

 

Im trying to use

 

Load 

If(Desc='*ABC*',1,Desc) AS Desc

FORM ....

 

but for some reason i cant find '1' under the list box of Desc field

 

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Try this
If(wildmatch(Desc, '*ABC*'),1,Desc) AS Desc
Or
If(index(Desc, 'ABC'),1,Desc) AS Desc
Or
If(substring(Desc, 'ABC'),1,Desc) AS Desc
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

2 Replies
Anil_Babu_Samineni

Try this
If(wildmatch(Desc, '*ABC*'),1,Desc) AS Desc
Or
If(index(Desc, 'ABC'),1,Desc) AS Desc
Or
If(substring(Desc, 'ABC'),1,Desc) AS Desc
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shahafei2
Creator
Creator
Author

Thank you,

The index function worked great for me