1 Reply Latest reply: Jul 23, 2011 10:56 PM by Nagaian Krishnamoorthy RSS

    Looking up info in an "unlinked" table and showing it in a Straight Table

      Fellow Qliksters,

       

      A question from a newbie.

       

      Leaving aside the lengthy reason why, here is something I'm interesting in doing, or at least learning how it could be done although it may not be the most Qlikfriendly method. I may for example want do this as a quick patch before doing a larger overhaul of the application in question.

       

      Imagine that I have a Straight Table that has some fields showing. I have given labels to those fields, but could also refer to them as column(1), column(2), etc.

       

      Now imagine that in the loading script, I loaded a table that has no linkages to the rest of the tables in the application.

       

      Now imagine that I want to get some values from that table and show those values in the applicable rows in the Straight Table. Furthermore, in order to get the right values from this "unlinked" table I want to use values from respective rows in the straight table. Essentially I want to do a SQL style query on the unlinked table and the Where clause would include the field labels (or column references) from the Straight Table.

       

      For example,

      say my straight table looks like this:

       

      FieldX, FieldY,

      1,B

      4,A

       

      then, say my unlinked table loaded into the application is as follows:

      1,A,V1

      1,B,V2

      4,A,V3

      4,B,V4

       

      then say that I want my straight table to end up as follows:

      FieldX, FieldY, FieldNew

      1,B,V2

      4,A,V3

       

      Is there a way to write an expression to define FieldNew that does a SQL style lookup to the unlinked table and uses the FieldX and FieldY labels (or column references) as arguments to identify which row in the unlinked table to get a value from?

       

      Although I am a newbie I am aware of the right way to do this (based on the above example), but I have a hard to explain scenario that is not as simplistic as the above where something like this would help me make a temporary patch until I overhaul the application.

       

      Your help is most appreciated.