Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Valued Contributor II

What is the meaning of Lookup function.

Please tell me all about lookup function with a example in detail.

I am very confused about it .

Thanks .

3 Replies
Not applicable

Re: What is the meaning of Lookup function.


There is something in the resource section, hope it helps.




Honored Contributor II

Re: What is the meaning of Lookup function.

ApplyMap is a lookup function, it's when you want to match a value from one table to another and return a new value based on that match.

Like VLOOKUP in Excel

below is an example

I created a qvd of a mapping table containing 2 columns

I need to add Warehouse Description to my Chambers Table that contains a common field of Warehouse


Then in my chamber table I use the ApplyMap function to lookup against my mapping table above, so I can add the Warehouse Description to Chamber Table


Basically it has allowed me add the Warehouse Description to my Chambers table, like you would use the VLOOKUP Function in Excel

I hope that helps

Not applicable

Re: What is the meaning of Lookup function.

Generally, the LookUp function is used to get the specific field value corresponding on the different field value in the same table.

Here is info from help file:

lookup(fieldname, matchfieldname, matchfieldvalue [, tablename])

Returns the value of fieldname corresponding to the first occurrence of the value matchfieldvalue in the field matchfieldname.

Fieldname, matchfieldname and tablename must be given as strings (e.g. quoted literals).

The search order is load order unless the table is the result of complex operations such as joins, in which case the order is not well defined.

Both fieldname and matchfieldname must be fields in the same table, specified by tablename. If tablename is omitted the current table is assumed.

If no match is found, null is returned.


lookup('Price', 'ProductID', InvoicedProd, 'pricelist')

In the above example: Price of InvoiceProd value from pricelist table.

Community Browser