Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

capriconuser
New Contributor III

like in qlikview

I have a data like this

knee join

knee pain

knee

knee JT

eye

eye pain

eye damage

eyelid retraction right eye

mouth

abdomen

dysprea

frontal

now i want to get like this ...

like when anywhere where knee  word is found i want to name all these word with knee and when any word start from eye then want to name it eye

and except this all renaming i want to name it "other"

knee joinknee
kneepain                                 knee
Abrasion, left knee, initial encounterknee
knee JTknee
eyeeye
eye paineye
eye damageeye
eyelid retraction right eyeeye
mouthmouth
abdomenother
dyspreaother
frontalother

i tried this

If(WildMatch(col1,'*knee*'),'Kneee',If(WildMatch(col1,'*eye*'),'Eye'))

but this shows only 1 result with eye where as i have 3 records related to eye and knee record is not display..

Tags (4)
1 Solution

Accepted Solutions
MVP
MVP

Re: like in qlikview

As the other suggested you can use the WildMatch() function although it is not necessary to complicate it with multiple Wildmatch and If:

     Pick(WildMatch(Lower(Bodypart),'knee*','eye*','mouth')+1,'other','knee','eye','mouth')

13 Replies
jayshrinipurte
Contributor

Re: like in qlikview

Dear Capricon,

WildMatch() function will help you.

If(WildMatch(Field_Name,'Knee*'),'Kneee',

If(WildMatch(Field_Name,'Eye*'),'Eye'))

Regards,

Jayshri

keerthika
Contributor II

Re: like in qlikview

Hi,

Try this one

if(WildMatch(name,'knee*'),'Knee',

if(WildMatch(name,'eye*'),'eye',

'other'))

capriconuser
New Contributor III

Re: like in qlikview

what if

like i have a knee word where this is place in the end ,in between or anywhere position ..

like anywhere knee word is identified i want to name as "knee"

like this

knee join

joint knee break

break knee join 2

Abrasion, left knee, initial encounter

i want to name this all as "knee"

jayshrinipurte
Contributor

Re: like in qlikview

If(WildMatch(Field_Name,'*Knee*'),'Kneee',

If(WildMatch(Field_Name,'*Eye*'),'Eye'),

'Others')

MVP
MVP

Re: like in qlikview

As the other suggested you can use the WildMatch() function although it is not necessary to complicate it with multiple Wildmatch and If:

     Pick(WildMatch(Lower(Bodypart),'knee*','eye*','mouth')+1,'other','knee','eye','mouth')

capriconuser
New Contributor III

Re: like in qlikview

this expression did not work this shows an error on others

MVP
MVP

Re: like in qlikview

You will have to use the wildcard pattern:

     '*knee*'     which will pick any sentence with the characters knee in it

jayshrinipurte
Contributor

Re: like in qlikview

If(WildMatch(Field_Name,'*Knee*'),'Kneee',

If(WildMatch(Field_Name,'*Eye*'),'Eye',

'Others'))

capriconuser
New Contributor III

Re: like in qlikview

this is not working i have several words where knee word word is exist but none of them is displayed