Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
TakudzwaZembe
Contributor
Contributor

What Piece of code do I use to change similar names

 

I have used the above piece of code to change all caps to lower case and it works fine. 

=if(upper(ClaimStatusDescription)='SERVICE','Service',

 

What piece of code can I use to change "Servicing" to "Service"? and "Service Delays" to Service

Labels (1)
1 Solution

Accepted Solutions
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @TakudzwaZembe 

Try this

if(wildmatch(ClaimStatusDescription,'servic*'),'Service',ClaimStatusDescription)

won't care about upper or lower case

or, if you whan to be more specific

if(wildmatch(ClaimStatusDescription,'Servicing','Service Delays'),'Service',ClaimStatusDescription)

 

hope it helps

help users find answers! Don't forget to mark a solution that worked for you & to smash the like button!

View solution in original post

2 Replies
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @TakudzwaZembe 

Try this

if(wildmatch(ClaimStatusDescription,'servic*'),'Service',ClaimStatusDescription)

won't care about upper or lower case

or, if you whan to be more specific

if(wildmatch(ClaimStatusDescription,'Servicing','Service Delays'),'Service',ClaimStatusDescription)

 

hope it helps

help users find answers! Don't forget to mark a solution that worked for you & to smash the like button!

JuanGerardo
Partner - Specialist
Partner - Specialist

Hello,

You can use different approaches, but one of them could be to use the Levenshtein distance between strings. In case of Servicing vs Service it's 3, that is a 33% of the base string length:

JuanGerardo_0-1687888586136.png

 

More info here: https://help.qlik.com/en-US/sense/May2023/Subsystems/Hub/Content/Sense_Hub/Scripting/StringFunctions...

 

JG