Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Multiple select box

Hi;

How I can make a multiple select box from this LOAD:


sites:

LOAD

  if(WildMatch5(NAME, '*NAME1*'), 'Brand1') as [Brand1],

  if(WildMatch5(NAME, '*NAME2*'), 'Brand2') as [Brand2],

  if(WildMatch5(NAME, '*NAME3*'), 'Brand3') as [Brand3],

  if(WildMatch5(NAME, '*NAME4*'), 'Brand4') as [Brand4],

  if(WildMatch5(NAME, '*NAME4*'), 'Brand5') as [Brand5],

  if(WildMatch5(NAME, '*NAME5*'), 'Brand6') as [Brand6]

FROM

C:\sites.qvd(qvd)

1 Solution

Accepted Solutions

Re: Multiple select box

I have updated....

Use Pick Instead of If

PICK(WildMatch(NAME,'*NAME1*','*NAME2*','*NAME3*','*NAME4*','*NAME5*'), [Brand1],[Brand2],[Brand3],[Brand4],[Brand5]) as FieldName

4 Replies

Re: Multiple select box

LOAD

Pick(WildMatch(NAME,'*NAME1*','*NAME2*','*NAME3*','*NAME4*','*NAME5*'), [Brand1],[Brand2],[Brand3],[Brand4],[Brand5]) as FieldName

From

C:\sites.qvd(qvd);


UPDATE : I have updated Pick instead of IF

Not applicable

Re: Multiple select box

Manish Kachhia
How I can solve this issue?

Error in expression:

If takes 2-3 parameters

sites:

LOAD SITE_ID,

     NAME,

     IF(WildMatch(NAME,'*NAME1*','*NAME2*','*NAME3*','*NAME4*','*NAME5*'), [Brand1],[Brand2],[Brand3],[Brand4],[Brand5]) as FieldName

Re: Multiple select box

I have updated....

Use Pick Instead of If

PICK(WildMatch(NAME,'*NAME1*','*NAME2*','*NAME3*','*NAME4*','*NAME5*'), [Brand1],[Brand2],[Brand3],[Brand4],[Brand5]) as FieldName

Not applicable

Re: Multiple select box

Perfect Manish Kachhia, thank for your help...

This is the final sentence:

Pick(WildMatch(NAME,'*NAME1*','*NAME2*','*NAME3*','*NAME4*','*NAME5*'), 'Brand1','Brand2','Brand3','Brand4','Brand5') as FieldName

Community Browser