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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Wildmatch with a COLUMN/ Variable

Hi,

Below is the data I'm working on and the Results column is what I want to obtain.

Basically, I want to check if [PROD SKILLS] is inside the [SKILLS SET] then Results = 1 otherwise 0.

   

PROD SKILLSSKILLS SETResults
applebanana apple carrots1
carrotscarrots1
bananacarrots apple0

Appreciate your help on this. Thank you!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Since you were explicitely asking for a Wildmatch expression:

If(WildMatch([SKILLS SET],'*'&[PROD SKILLS]&'*'), 1,0) as WildMatch_Exp

PROD SKILLS SKILLS SET Varsha_Exp Sunny_Exp WildMatch_Exp
applebanana apple carrots111
bananacarrots apple000
carrotscarrots111

View solution in original post

8 Replies
varshavig12
Specialist
Specialist

if(substringcount([SKILLS SET],[PROD SKILLS])>0,1,0)

Anil_Babu_Samineni

Varsha Solution might work but you cab try this too

if(substringcount([SKILLS SET],-[PROD SKILLS])>0,1,0)

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
sunny_talwar

Or even with Index

If(Index([SKILLS SET],[PROD SKILLS])>0,1,0)

Sample Script:

Table:

LOAD *,

  If(SubStringCount([SKILLS SET],[PROD SKILLS]) > 0, 1, 0) as Varsha_Exp,

  If(Index([SKILLS SET],[PROD SKILLS]) > 0, 1, 0) as Sunny_Exp;

LOAD * INLINE [

    PROD SKILLS, SKILLS SET

    apple, banana apple carrots

    carrots, carrots

    banana, carrots apple

];

Capture.PNG

Anil_Babu_Samineni

Sunny, Index and Subfieldcount two function working as Same or what?

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
sunny_talwar

They work similarly but not the exact same.

varshavig12
Specialist
Specialist

Doing the same thing with index is new for me. Thanks!

swuehl
MVP
MVP

Since you were explicitely asking for a Wildmatch expression:

If(WildMatch([SKILLS SET],'*'&[PROD SKILLS]&'*'), 1,0) as WildMatch_Exp

PROD SKILLS SKILLS SET Varsha_Exp Sunny_Exp WildMatch_Exp
applebanana apple carrots111
bananacarrots apple000
carrotscarrots111
varshavig12
Specialist
Specialist

If(WildMatch([SKILLS SET],'*'&[PROD SKILLS]&'*'), 1,0) as Stefan_Exp