Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody.
I have a table (table 1) connected to another table (table2) by a key.
I have to add new fields to the table 1 with an excel and i have to do calculations with if and that sort of things (in the table 1). But i have one field (Concept) in the table 2 and i have to use it in the calculations from the table 1.
I don't wanna join the tables, should i use lookup? I tried to use this function but it didn't work.
Thank you
Hi,
If you want to do this in script then you have to use join and bring all the fields in one table.
If not then try it in front end.
Regards
You can use ApplyMap.
//First load your second table:
Table2:
Load * from Table2.xls (...);
//Create a mapping table with the field you need.
mapConcept:
mapping load %KeyField, Concept resident Table2;
//Load Table1
Table1:
Load *,
if(ApplyMap('mapConcept',%KeyField,null()) = 'Your condition', ....)
from Table1.xls (...)
Applymap is a safer option than using a join, as applymap will only return a single value (or null) unlike a join which may cause the number of rows in your data to increase if two values match the join criteria.
There are more details here
http://community.qlik.com/blogs/qlikviewdesignblog/2012/09/18/one-favorite-function-applymap