Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Sunil_Kenth
Former Employee
Former Employee

Syntax Help....

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

1 Reply
Miguel_Angel_Baeyens

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.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica