Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Need some help with some syntax please:
if
(MixMatch([Contractor / Permanent], 'Contractor', 'contractor','Contractor '), 'Contractors' or
if(MixMatch([Contractor / Permanent],'SI', 'SI ','SI Partner'),'SIPartner'), or
if(MixMatch([Contractor / Permanent],'?', 'FTC'), 'Other', [Contractor / Permanent])) as [Contractor / Permanent_New],
I would like to group my data together in certain buckets:
'Contractor', 'contractor','Contractor ' = 'Contractors'
'SI', 'SI ','SI Partner' = 'SIPartner'
'?', 'FTC' = 'Other'
Then call the the rest keep it the same and for the new buckets created create a new field called [Contractor / Permanent_New].
Thanks,
Sunil
Hi Sunil,
I'd use instead a mapping load and a MapSubString() in the field
OldNewValueMap:
MAPPING LOAD * INLINE [
Contractor, Contractors
contractor, Contractors
Contractor , Contractors
SI, SIPartner
SI , SIPartner
SI Partner, SIPartner
?, Other
FTC, Other
];
Change:
LOAD *,
MapSubString('OldNewValueMap', [Contractor / Permanent]) AS [Contractor / Permanent_New]
INLINE [
Contractor / Permanent
Contractor
Different Value
contractor
SI Partner
?
FTC
ftc
];
Hope that helps.
BI Consultant