Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Wildmatch

Hi All

I have a filed called Group in which there are 7 groups ...

I want to display all the 7 groups ans also trying to create a field call JDS which has 5 groups within it .. that is (JDS should have = 'Check-in','Host','Payments','Reservations','Ticketing')

And iam writing the below wildmatch function...

when i reload it shouws me only 7 group the new group name JDS is not showing up ...

please need your help ..

if(WildMatch(Group,'Check-in'), 'Check-in',

if(WildMatch(Group,'Host'), 'Host',

if(WildMatch(Group,'Offer'), 'Offer',

if(WildMatch(Group,'Payments'),'Payments',

if(WildMatch(Group,'Reservations'),'Reservations',

if(WildMatch(Group,'Tech SRVS'), 'Tech SRVS',

if(WildMatch(Group,'Ticketing'),'Ticketing',

if(WildMatch(Group,'Check-in','Host','Payments','Reservations','Ticketing'),

'JDS')))))))) as GROUP_NAME,

I want to show it like shown in the screenshot below

Groups.PNG

Thanks in Advance

5 Replies
PrashantSangle

not possible in one if statement.

You have to load same table twice and concatenate those table like

Table:

Load *,Group as GroupName from table1;

concatenate

Load *,if(WildMatch(Group,'Check-in','Host','Payments','Reservations','Ticketing'),'JDS')) as GroupName

from table1;

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
smilingjohn
Specialist
Specialist
Author

Hi Prashanth ,

Thanks for the reply ...

Iam using the below script please let me know if this is correct ....

Group:

LOAD GROUP_NAME,

KEY_ID,

NAME

FROM

[..\Group.qvd]

(qvd);

Concatenate (Group)

Load

if(WildMatch(GROUP_NAME,'Check-in','Host','Payments','Reservations','Ticketing'),'DS') as GROUP_NAME,

KEY_ID,

NAME

Resident Group;

Thanks.....

sasiparupudi1
Master III
Master III

May be like this

Group:

LOAD GROUP_NAME,

KEY_ID,

NAME

FROM

[..\Group.qvd]

(qvd);

Concatenate (Group)

Load

'RDS' AS GROUP_NAME

KEY_ID,

NAME

Resident Group

WHERE WildMatch(GROUP_NAME,'Check-in','Host','Payments','Reservations','Ticketing');

ilyas_coban
Contributor II
Contributor II

I guess you should create another field something like MAIN_GROUP_NAME with JDS and a GROUP_NAME without JDS. With this you can cover groups you intend to. Otherwise you may concatenate same table with JDS group name but I don't recommend it since duplicate records will cause some trouble.

  

MAIN_GROUP_NAMEGROUP_NAME
JDSCheck-in
JDSHost
JDSPayments
JDSReservations
JDSTicketing
OfferOffer
Tech SRVSTech SRVS

Lastly, here is a little tip about writing less repeating code:

Pick( Match( Group, 'Offer', 'Tech SRVS', 'Check-in','Host','Payments','Reservations','Ticketing')

, 'Offer', 'Tech SRVS', 'JDS','JDS','JDS','JDS','JDS') as MAIN_GROUP_NAME

PrashantSangle

Hi,

yes you are correct. or try alteranate appoach suggested by sasiparupudi1‌.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂