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: 
pala_jagadeesh
Contributor III
Contributor III

condition given for match values

Hi i have an table like below

groupid region
aaa usa;uae;canada
bbbb india;japan;china
ccc india;europe;aus
ddd chile;china;buton
eee germany;austria;texas

 

output like below

groupid region Condition
aaa usa;uae;canada yes
bbbb india;japan;china No
ccc india;europe;aus yes
ddd chile;china;buton no
eee germany;austria;texas;korea yes

 

How to write condition or match fucntion here ,

if Uae and canada present for groupid(aaa) given as condition yes

if india and aus present for groupid(ccc) given as condition yes

if austria and korea present for groupid(eee) given as condition yes

for remaining all groups condition No

Labels (3)
1 Solution

Accepted Solutions
JHuis
Creator III
Creator III

Dear Pala,

 

 

TEST:

Load * inline [

groupid, region
aaa, usa;uae;canada
bbbb, india;japan;china
ccc, india;europe;aus
ddd, chile;china;buton
eee, germany;austria;texas];

 


TEST2:
Load
groupid,
region,
If(groupid='aaa' and WildMatch(region,'*uae*','*canada*'),'yes'
,If(groupid='ccc' and WildMatch(region,'*india*','*aus*'),'yes'
,If(groupid='eee' and WildMatch(region,'*austria*','*korea*'),'yes','No'))) as Condition
Resident TEST
;


drop table TEST

View solution in original post

2 Replies
JHuis
Creator III
Creator III

Dear Pala,

 

 

TEST:

Load * inline [

groupid, region
aaa, usa;uae;canada
bbbb, india;japan;china
ccc, india;europe;aus
ddd, chile;china;buton
eee, germany;austria;texas];

 


TEST2:
Load
groupid,
region,
If(groupid='aaa' and WildMatch(region,'*uae*','*canada*'),'yes'
,If(groupid='ccc' and WildMatch(region,'*india*','*aus*'),'yes'
,If(groupid='eee' and WildMatch(region,'*austria*','*korea*'),'yes','No'))) as Condition
Resident TEST
;


drop table TEST

pala_jagadeesh
Contributor III
Contributor III
Author

@JHuis 

Thnak you so much