4 Replies Latest reply: Oct 28, 2016 1:43 AM by Kunal Verma RSS

    Flags|Custom Selections

    Kunal Verma

      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.

        • Re: Flags|Custom Selections
          Sunny Talwar

          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

          • Re: Flags|Custom Selections
            Andy Weir

            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

            • Re: Flags|Custom Selections
              Massimo Grossi

              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;