Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Guru,
I have a script as below;
if ( [Service] Like '*Admin*', 'Admin',
if ( [Service] Like '*Complaint*', 'Complaint',
if ( [Service] Like '*Claim*', 'Claim',
if ( [Service]Like '*Sale*', 'Sale',
if (not [Service] like ('*Sale*','*Admin*','*Complaint*','*Claim*')),'Other')))) as ServiceType
Apparently the 'Other' is not being created. Kindly assist
Try
if ( [Service] Like '*Admin*', 'Admin',
if ( [Service] Like '*Complaint*', 'Complaint',
if ( [Service] Like '*Claim*', 'Claim',
if ( [Service] Like '*Sale*', 'Sale', 'Other')))) as ServiceType
Try this may be:
If([Service] Like '*Admin*', 'Admin', If([Service] Like '*Complaint*', 'Complaint', If([Service] Like '*Claim*', 'Claim', If([Service] Like '*Sale*', 'Sale','Other')))) as ServiceType
Thank you so much. It worked
= if ( lower([Service]) Like '*admin*', 'Admin', if ( lower([Service]) Like '*complaint*', 'Complaint', if ( lower([Service]) Like '*claim*', 'Claim', if ( lower([Service]) Like '*sale*', 'Sale', 'Other')))) as ServiceType
please close this thread by marking the correct answer
Another option
Pick(WildMatch(Service, '*Admin*', '*Complaint*', '*Claim*', '*Sale*') + 1, 'Other', 'Admin', 'Complaint', 'Claim', 'Sale')