Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have been using Qlikview for a while, however never used Lookup. I always prefer having joins for lookup.
I tried lookup but could not get the result. I tried below script to get [Emp Name] from table a in table band I want to know what wrong am I doing?
Thanks in advance!!
a:
LOAD [Emp ID],
[Emp Name]
FROM
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
b:
LOAD [Emp ID],
Location,
Lookup('[Emp Name]','[Emp ID]',[Emp ID],',a')as name
FROM
(ooxml, embedded labels, table is Sheet2);
Applymap() is a better option: Don't join - use Applymap instead
HIC
PS There is a comma too much in your Lookup() function and you use the wrong quotes. Try instead
Lookup('Emp Name','Emp ID',[Emp ID],'a') as name
Applymap() is a better option: Don't join - use Applymap instead
HIC
PS There is a comma too much in your Lookup() function and you use the wrong quotes. Try instead
Lookup('Emp Name','Emp ID',[Emp ID],'a') as name
Perfect!! Thanks
You suggested using Apply Map, I have one question-How it is better than join or lookup function?
Hi Kamal,
There is no rule of a thumb that tells you when to use which function/ technique. You should always try what you think is best based on a given scenario.
It all depends on how large is your data sets you want to combine. A JOIN is very flexible / powerful but also a resource intensive. Mapping tables are extremely fast but you won't experience any improvement on small data sets. Usually QlikView developers tend to prefer Applymap to any JOIN simply because of its efficiency. When a document has to be reloaded in a densely populated QDS environment, every second and every MB saved is crucial for achieving optimal performance.
Applymap() executes faster, and has a much easier syntax than Lookup(). (With Lookup() you often have problems getting the quotation marks right.)
Applymap() is less error-prone than a join. A join often duplicates records so that calculations return incorrect answers. This never happens with Applymap().
HIC