Business Intelligence
Now Reading
Qlikview Lookup() Function

Qlikview Lookup() Function

by KieranMarch 30, 2016

Doing a VLookup in Qlikview is not as difficult as it first seems. When you start trawling the web, you’ll find people suggesting you use the ApplyMap function. Lookup is similar to ApplyMap but the number of fields can be greater than 2 in the source table. The first step is to set up a mapping table:

DependencyList:
LOAD
ref, Dependent, [Target Date]
from [C:\Users\Documents\Programme Dashboard\Dependencies.xlsx](ooxml, embedded labels, table is [Risk]);

The next step is to add a lookup to your load script. The correct Syntax for the Lookup is:

Lookup('FieldName', 'KeyFieldName', KeyFieldValue [, 'TableName'])

I’ve included the full script below:

qlikview dashboard


DependencyList:
LOAD ref, Dependent, [Target Date]
from [C:\Users\Documents\Programme Dashboard\Dependencies.xlsx](ooxml, embedded labels, table is [Risk]);
LOAD ref,
[Risk Date Raised],
[Raised by],
Description,
[Risk Owner],
[Mitigation/ Contingency Actions],
Probability,
LOOKUP([Target Date], ref, Dependent, 'DependencyList') as Dependency1TargetDate,
LOOKUP([Target Date], ref, LOOKUP(Dependent, ref, Dependent, 'DependencyList'), 'DependencyList') as Dependency2TargetDate,
LOOKUP([Target Date], ref, LOOKUP(Dependent, ref, LOOKUP(Dependent, ref, Dependent, 'DependencyList'), 'DependencyList'),'DependencyList') as Dependency3TargetDate,
[Impact Level],
Status,
Dependent,
[Target Date],
RAG
FROM
[C:\Users\Documents\Programme Dashboard\Dependencies.xlsx]
(ooxml, embedded labels, table is Risk);

 

Image used under creative commons

What's your reaction?
Love It
0%
Interested
0%
Meh...
0%
What?
0%
Hate It
0%
Sad
0%
About The Author
Kieran

My name is Kieran, I love to see how technology can drive business growth. I started the Netshock technology blog as a place to share my thoughts and experiences with a wider audience. I cover all sorts of topics, from marketing to development.