2 Replies Latest reply: Nov 20, 2011 11:56 PM by Felipe Ruiz RSS

    Resolve key synthetic in a model

    Felipe Ruiz

      Hi,

       

      In the next image there's a synthetic key that i need to resolve. This is the situation:

       

      There's a key table between two transactions tables, but also i need to connect the two tables with the field _PK_Historia_Paciente. How i can resolve this without the key synthetic.

       

      img.png

      Thanks,

        • Re: Resolve key synthetic in a model
          John Witherspoon

          Without knowing anything more about the data, it looks like a perfectly reasonable data model to me.  Do you need the synthetic key removed for a specific reason, or only because you were taught that you should always remove synthetic keys?

           

          If you want these tables to be connected by both _PK_KeyTable and by _PK_Historia_Paciente, then it is probably reasonable for them to be connected by a synthetic key.  A synthetic key is simply how QlikView models a connection between tables that involves more than one field.

           

          My opinion on synthetic keys along with some discussion and disagreement can be found in the following thread:

           

          http://community.qlik.com/thread/10279?start=30&tstart=0

            • Resolve key synthetic in a model
              Felipe Ruiz

              Hi,

               

              I solved the model like this in the attached image, but now I have the following problem;

              When I select a date I get the occupation and i need  to get the "Facturacion" where  "Historia ocupación, Ingreso ocupación" is equal with "Historia facturación, Ingreso facturación". How i can do it with set analysis ?

               

               

               

              img.png


               

              Thanks,