Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

yatra_qlik
New Contributor

Flags|Custom Selections

Hi Guys,

I have a trivial problem at hand.
Let's say I have product codes as below:

Product code              Product

1                                Green Premium Shirt

2                                Red Regular Trousers

3                                Red Premium Trousers

4                                Yellow Regular Trousers

and so on....

Now I want to create a dropdown or filter with the following values:

1 All green --- as soon as I click this/ select this all charts on my sheet should show values for all green products.

2 All trousers ---- similarly when I select "all trousers" from a dropdown or any other way... data in my sheet is filtered for trousers.

3 All regular ---

4 All Premium --
etc.

Please suggest a way along with extensions so that I can accomplish this. An attached qvf will help me a long way.
I have tried set analysis, some buttons but to no great help.

4 Replies
MVP
MVP

Re: Flags|Custom Selections

Try this out:

Table:

LOAD * INLINE [

    Product Code, Product

    1, Green Premium Shirt

    2, Red Regular Trousers

    3, Red Premium Trousers

    4, Yellow Regular Trousers

];

LinkTable:

LOAD Distinct [Product Code],

  'All Green' as Flag

Resident Table

Where WildMatch(Product, '*Green*');

Concatenate (LinkTable)

LOAD Distinct [Product Code],

  'All Trousers' as Flag

Resident Table

Where WildMatch(Product, '*Trousers*');

Concatenate (LinkTable)

LOAD Distinct [Product Code],

  'All Regular' as Flag

Resident Table

Where WildMatch(Product, '*Regular*');

Concatenate (LinkTable)

LOAD Distinct [Product Code],

  'All Premium' as Flag

Resident Table

Where WildMatch(Product, '*Premium*');

Capture.PNG

ogster1974
Honored Contributor II

Re: Flags|Custom Selections

You could just set up a filter on products and use the built in search function on the filter itself so you type green into search and all products that are green silk be highlighted. Type trousers and all trousers will be highlighted. This is standard qlik out of the box functionality you don't need to spend time building these kinds of flags.

Hope this helps

Andy

MVP
MVP

Re: Flags|Custom Selections

Table:

LOAD * INLINE [

    Product Code, Product

    1, Green Premium Shirt

    2, Red Regular Trousers

    3, Red Premium Trousers

    4, Yellow Regular Trousers

];

T2:

load

  [Product Code],

  'All ' & SubField(Product, ' ') as Filter

Resident Table;

yatra_qlik
New Contributor

Re: Flags|Custom Selections

This is the best correct answer!

Thanks all!