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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie777
Partner - Creator III
Partner - Creator III

Look up field value from another table

Hello,

I'd like to lookup a field from another table, but I am not sure how I can use Lookup() function.  I found out the syntax, but do I have to enter that in the load script?  

Do I have to just write lookup() and the syntax, or do I have to write something else?  Also, if possible, I'd like to do that in calculated field rather than the load script as I come from Excel background, and calculated field seems easier for me. 

Thank you for your help.

 

6 Replies
tresesco
MVP
MVP

Try with Applymap() instead.

Newbie777
Partner - Creator III
Partner - Creator III
Author

Thanks for your reply. Can I use Applymap() in the calculated field or do I have to do it in load script which I find it still a little intimidating as I might break some automatically generated codes.  

tresesco
MVP
MVP

Are these table associated? Could you explain with a sample app or data set?

Newbie777
Partner - Creator III
Partner - Creator III
Author

Thanks for getting back again.  These tables are not associated because if I associate them, the calculations gets messed up; therefore, they need to remain disconnected tables in order for the calculation to work.  

Kushal_Chawda

@Newbie777  There might be various approach to handle this scenario depending on requirements. Would you be able to share sample data with expected output?

Newbie777
Partner - Creator III
Partner - Creator III
Author

Thanks for getting back again.  As shown below, I'd like to keep the two tables disconnected between Employee table and Customer table as associating these will mess up the calculation in other areas with other fact tables.  

Newbie7_1-1626441830087.png

I'd like to have the name of sales reps from the employee database using 'Sales Rep' field in the Customer table and 'Salesman code' in the Employee table as the identifying keys.  I attach the sample dummy data file as an example.  

Thanks for your help.