Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

hi i understand the concept of lookup function but i dont know how to say that concept in terms of technically pls help any body?

hi i understand the concept of lookup function but i dont know how to say that concept in terms of technically pls help any body?

7 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See this document: Joins and Lookups


talk is cheap, supply exceeds demand
Not applicable
Author

Hey Manoj,

Check out the attached file from Jagan Mohan. This is a very simple example of the basic concept behind lookup function. Once you go through it you will be more clear.

Lookup('Output Field','SearchField',SearchValue,'TableName')

Hope it helps

Thanks

AJ

Anonymous
Not applicable
Author

Manoj Kumar:

You can also read any document regarding APPLY MAP and Mapping Tables.

This function is very similar to lookup and easier to undersand (at least, for begginers).

CB.


Not applicable
Author

SaleLastYear:

Load * Inline

[

  Customer_ID, Sales2012

  A, 500

  B, 600

  C, 700

  D, 400

  E, 1000

  F, 800

];

Sales:

Load *,

  Lookup('Sales2012','Customer_ID', ID,'SaleLastYear') as LYSale  ----------(here sales2012 ,customer_id,                                                                                                                        and saleslastyear from same table

Inline                                                                                                   but id is from second table is it                                                                                                                     mandatory)pls exlain

[

  ID, Month2013, Sales

  A, Jan, 100

  B, Jan, 200

  C, Jan, 300

  D, Feb, 150

  E, Mar, 200

  F, Apr, 100

  A, May, 140

  D, May, 80

  E, May, 100

  F, Jun, 150

];

MK_QSL
MVP
MVP

Lookup('Sales2012','Customer_ID', ID,'SaleLastYear') as LYSale


Here we have two tables..

SaleLastYear : having two fields Customer_ID, Sales2012

Sales : having three fields ID, Month2013, Sales


Our aim is to get Last Year Sales (i.e. Sales2012) for each Customer so that we can compare it to current year.

As Ajay has mentinoned...

Lookup('Output Field','SearchField',SearchValue,'TableName')


Output Field     = Sales2012, means the result field we need from the other table

SearchField      = Customer_ID, means the matching field from other table

SearchValue     = ID, means the field of current table in which we are using Lookup and which is comparable to SearchField of other table.

TableName      = SaleLastYear, means Name of table from which the we need output.


Hope this will make you clear about LOOKUP function.


Not applicable
Author

Excellent

MK_QSL
MVP
MVP

Can you close the thread by selecting CORRECT answer?