2 Replies Latest reply: May 4, 2016 7:56 AM by Paulo Lindoso RSS

    Add filter based on other filter

    Paulo Lindoso

      Hello,

       

      I am still struggling in my first steps with Qlik, so please bear with me!

       

      I have successfully loaded my tables and was able to set up some basic filters.

       

      I have two tables which are linked by date through a Canonical Calendar (please see attached image).

       

      Now I want to be able to filter these 2 tables not only based on the date, but also on city.

       

      My first approach was to set a filter for the first table and have Qlik "copy" this filter to the second table, but that doesn't seem to work as Qlik "replaces" one filter for the other instead of keeping them both.  I have tried to "toggle select", placed 2 list boxes, but in all cases, Qlik replaces one filter for the other. (please see attached images)

       

      What is the correct approach for this problem?

        • Re: Add filter based on other filter
          Marcus Sommer

          Between those fields are no respectively the right associations available - you could see it quite clearly within the listboxes - if you select one item you need to see items with white background-color into the other listbox and not only one one with a grey background-color.

           

          I think you will need to rethink your whole datamodel. For this try to reduce the number of fact-tables (by concatenating/mapping/joining) and if possible avoid link-tables to go in direction of a star-scheme - this isn't mandatory necessary to create a working datamodel in qlik but it's often the easiest way to create a datamodel and avoids potentially problems with unsuccessful associations.

           

          - Marcus

            • Re: Add filter based on other filter
              Paulo Lindoso

              Thanks for the tips Marcus!

               

              I got it right now!

               

              The issue with these two tables was the fact that they share related fields, but no primary key (PK), since they are related info from two different sources.

               

              What I ended up doing (not sure if this is the best "Qlik approach") was creating a LINK TABLE which was the "CONCATENATE" of the info I would like to filter together with each table's PK.

               

              As I am writing, I am wondering if I could create an "artificial PK" within each table, UNQUALIFY it and Qlik would then link them accordingly.

               

              I will post back eventually.

               

              Thanks again!

              Paulo.