Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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....
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;
Is the logic that the 'highest' value must be shown (A11 is higher than A1)?
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
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;
go for treseco's solution
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
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...