Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

lrenwick
New Contributor II

Filter on a multi picklist

I have a field which is a multi-pick list so when I apply a filter it looks like;

Brand
WFI
NFI;PFI
PFI
WFI;NFI;JFI
JFI
NFI

 I would like to group the filters so all organisations operating under the NFI brand are highlighted when selected regardless of what other brands they are also attached to. Is there a way to do this in the filter pane?

Labels (3)
1 Solution

Accepted Solutions

Re: Filter on a multi picklist

You can script it

NewFilter:
LOAD
    Brand, SubField(Brand,';') as BrandFilter
RESIDENT
    TableWithBrandField
    ;

talk is cheap, supply exceeds demand
6 Replies

Re: Filter on a multi picklist

In the filter pane click on the magnifying glass icon to open the search box. There enter *NFI* as search string and press enter. That should highlight all the brands containing the string NFI

talk is cheap, supply exceeds demand
lrenwick
New Contributor II

Re: Filter on a multi picklist

Is there a way to tidy up the filter list so each brand only appears once rather than each combination appearing?

Re: Filter on a multi picklist

Yes, by creating an extra table in the script with a new field that you can use for the filter pane:

NewFilter:
LOAD * INLINE [
Brand, BrandFilter
WFI, WFI
NFI;PFI, NFI
NFI;PFI, PFI
PFI, PFI
WFI;NFI;JFI, WFI
WFI;NFI;JFI, NFI
WFI;NFI;JFI, JFI
JFI, JFI
NFI, NFI
];

talk is cheap, supply exceeds demand
lrenwick
New Contributor II

Re: Filter on a multi picklist

What if there's thousands of different combinations? Is there a easier way of scripting this, maybe using wildmatch?

I tried the below but it looks like incorrect syntax. 

NewFilter:
LOAD*INLINE [
Brand, BrandFilter
if(wildmatch([Brand__c],'*NFI*', 'NFI')

Re: Filter on a multi picklist

You can script it

NewFilter:
LOAD
    Brand, SubField(Brand,';') as BrandFilter
RESIDENT
    TableWithBrandField
    ;

talk is cheap, supply exceeds demand
lrenwick
New Contributor II

Re: Filter on a multi picklist

Thank you, this helped!
Community Browser