Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rsundarraj
Contributor III
Contributor III

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
amartinez35
Partner
Partner

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())

)

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))

amartinez35
Partner
Partner

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())

)

sunny_talwar

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

rsundarraj
Contributor III
Contributor III
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