Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Thanks in Advance
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,
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.....
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');
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_NAME | GROUP_NAME |
JDS | Check-in |
JDS | Host |
JDS | Payments |
JDS | Reservations |
JDS | Ticketing |
Offer | Offer |
Tech SRVS | Tech 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
Hi,
yes you are correct. or try alteranate appoach suggested by sasiparupudi1.
Regards,