Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

Is lookup is used for only two fields of table ?

When i am using two columns then it will not work .

My statement is :

 

Lookup

('%Programme Group ID','Programme Manager',[Programme Manager],'Programme Group') as [%Programme Group ID],

6 Replies
israrkhan
Specialist II
Specialist II

lookup is used to get a field from table A, Depends on a Filed in Table B,

see the help..

and see this doc

http://community.qlik.com/docs/DOC-3903

if not clear let me know

Khan

Not applicable

Hi Agnivesh,

Check out the Link given below.

http://community.qlik.com/docs/DOC-3903

Hope it Helps You..

Regards,

Ravikant

agni_gold
Specialist III
Specialist III
Author

Thanks for your help but i have personel edition so this file does not open.

But my question is if i want to get multiple field from table a , depends on fiel in table B ,

So what would be the script.

Thanks please edit that script which i have posted orignally.

israrkhan
Specialist II
Specialist II

If there are several possible values in the lookup table, the lookup function will just take the first one found.If you do expect several values for each of the input values, you should not use a lookup function to solve the problem.

Lookup ('ProductCategory', 'ProductID', ProductID, 'ProductTable')

in above, Lookup() function will return the value of the field ProductCategory (first parameter) in the table ProductTable (fourth parameter) from the record where the field ProductID (second parameter) has the same value as the field ProductID in the order data table (third parameter).

....................................

if you want to get multiple values, then use multiple time as below

Load

ID,

Name,

Lookup ('ProductCategory', 'ProductID', ProductID, 'ProductTable') as Lookup1,

Lookup ('ProductCategory', 'ProductID', ProductID, 'ProductTable')as lookup2


dont have qlikview intalled on this laptop, otherwise sure i test the script for you...


Edit:

Have you Read the attached document on, when to use Joins and when Lookup, and detail on lookup... see the doc

agni_gold
Specialist III
Specialist III
Author

can we make master key for all fields ?

If possible then please tell me how we write script .

israrkhan
Specialist II
Specialist II

did not get you,

let me know, what you want to do exactly. might be there would another way, instead of lookup.

in detail, explain please