Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Basic Table Join Question

Hi Everyone,

Greetings of the Day.

I have a question, I have two tables

Table1:

and Table2:

I am expecting a result like

i.e all the fields from Table1 should be retained but incase if the key matches with Table2, then the value (A and B) of Table2 should take precedence.

I understand(think so) join, keep and concatenation but i'm unable to figure out this.

Can someone please show me how to do this....

1 Solution

Accepted Solutions
tresesco
MVP
MVP

TableA:

Mapping Load Key, A From Table2;

TableB:

Mapping Load Key, B From Table2;

Final:

Load

          ApplyMap('TableA', A) As A,

         ApplyMap('TableB', B) As B

From Table1; 

View solution in original post

6 Replies
Michiel_QV_Fan
Specialist
Specialist

Is the logic that the 'highest' value must be shown (A11 is higher than A1)?

Not applicable
Author

Thanks for your prompt reply Michiel, the logic is that the values of Table2 should always take precedence( or to say overwrite Table1 values) if the Key Matches

tresesco
MVP
MVP

TableA:

Mapping Load Key, A From Table2;

TableB:

Mapping Load Key, B From Table2;

Final:

Load

          ApplyMap('TableA', A) As A,

         ApplyMap('TableB', B) As B

From Table1; 

Michiel_QV_Fan
Specialist
Specialist

go for treseco's solution

maternmi
Creator II
Creator II

Hi,

I recommend you Tresesco do to use apply map function. For more useful information to this function follow the link

http://community.qlik.com/blogs/qlikviewdesignblog/2012/09/18/one-favorite-function-applymap

BR

Michael

Not applicable
Author

I Appreciate your prompt response tresesco. Ive been working on QlikView for a couple of months now and regularly visit the community and you are among the few i look upto in terms of knowledge.

But looks like i underestimated the situation at hand, yes im sure your response will work perfectly with the scenario i listed(which was actually a torn down version of my problem). Actually i have a PriceList which i filled with Previous available values and this NewPriceList needs to get mapped on the old list. Its not working on my application, looks like i need to dig deeper to find how the columns are interacting.

Anyways really appreciate your response.

Have a Great Day...