Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use Pick and Match for the below

Hi gysbert wassenaar ,

Can anyone formulate the below with pick and match function .

=if(PG='M'

or PG='P others'

or PG='NE'

or PG='PE'

or PG='HC'

or PG='EC'

or PG='FOOD'

or PG='BIO'

or PG='DIS

or PG='SB'

or PG='Ca'

or PG='PH

or PG='PRO'

or PG='SEYO',dual('Others',26),

if(PG='CP',dual('CPS',12),

if(PG='PC',dual('PCS',10),

if(PG='VC',dual('VCS',11),

if(PG='ALL',null(),PG)))))

1 Solution

Accepted Solutions
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

If(Match(PC, 'M', 'P others', 'NE', 'PE', 'HC', 'EC', 'FOOD', 'BIO', 'DIS', 'SB', 'Ca', 'PH', 'PRO', 'SEYO'),

   Dual(Others', 26),

   Pick(Match(PG, 'CP', 'PC', 'VC', 'ALL')+1, PG, Dual('CPS', 12), Dual('PCS', 10), Dual('VCS', 11), Null())

)

Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

6 Replies
sunny_talwar

May be like this if this is the complete list of PG listed out in all the if statements:

Pick(Match(PG, 'CP', 'PC', 'VC', 'ALL') + 1, Dual('Others', 26), Dual('CPS', 12), Dual('PCS', 10), Dual('VCS', 11), Null())

sunny_talwar

Or this:

If(Match(PC, 'M', 'P others', 'NE', 'PE', 'HC', 'EC', 'FOOD', 'BIO', 'DIS', 'SB', 'Ca', 'PH', 'PRO', 'SEYO'), Dual(Others', 26),

If(Match(PG, 'CP', 'PC', 'VC', 'ALL'),

    Pick(Match(PG, 'CP', 'PC', 'VC', 'ALL'), Dual('CPS', 12), Dual('PCS', 10), Dual('VCS', 11), Null()), PG))

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

If(Match(PC, 'M', 'P others', 'NE', 'PE', 'HC', 'EC', 'FOOD', 'BIO', 'DIS', 'SB', 'Ca', 'PH', 'PRO', 'SEYO'),

   Dual(Others', 26),

   Pick(Match(PG, 'CP', 'PC', 'VC', 'ALL')+1, PG, Dual('CPS', 12), Dual('PCS', 10), Dual('VCS', 11), Null())

)

Help users find answers! Don't forget to mark a solution that worked for you!
sunny_talwar

So none of my two responses work for you rsundarraj‌? Just curious to know

Anonymous
Not applicable
Author

@Sunny T Please see Aurelien Martinez code. I tried your code but I couldn't get the exact answer what I want to get. may be you can help me any time near future.

sunny_talwar

I did see his response, and I saw a slight change in one of the places, but I guess I might have missed a parenthesis or two which might not have got you the result.

Anyways, I am glad that amartinez35‌ was able to help you out.

Best,

Sunny