Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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