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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

like function

is there a like function in qlikview?

I have a column called "bonus_description" and it has both letters and numbers in it, for example "new member 100% bonus"

what I want is to replace all "new member 100% bonus" to just "100%" and then do the same where there is 50%, 75% etc

Labels (1)
1 Solution

Accepted Solutions
rustyfishbones
Master II
Master II

29 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Use match or wild match (see help)

Not applicable
Author

try with wildmatch() function...

look it on qv help

tresB
Champion III
Champion III

Use Keepchar() / PurgeChar() function.

maxgro
MVP
MVP

=replace(' new member 100% bonus','new member', '')

Colin-Albert
Partner - Champion
Partner - Champion

Try

     trim(replace(replace(bonus_description,'new member',''),  'bonus','')) as bonus_percent

jvishnuram
Partner - Creator III
Partner - Creator III

Hi Abbasi,

You can use Keepchar() function.

Use like this in your script

Keepchar('bonus_description','0123456789%').,

it will fetch all the records like you want.

VJ
rustyfishbones
Master II
Master II

Hi Zainab,

there are a number of options

Here are 2

PURGECHAR()

2014-01-31_1010.png

KEEPCHAR()

2014-01-31_1008_001.png

Not applicable
Author

thanks

alexandros17
Partner - Champion III
Partner - Champion III

Keep char works in this way:

keepchar ( 'a1b2c3','123' )  returns '123'

This is not "like" ...

Am I right?