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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use lookup() ?

Hello

I think most of you already know how to use function lookup(). Unfortunelly I still can't find more details regarding this issue. I need to know how to proper use is and what are the limitations. Right now I'm working on a project where I have 2 tables:

Invoices

Exchange_rates

I need to get the exchange rate to each currency in invoices depending on to which currency I want to transfer the price from Invoices.

Please help

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Pawel,

function lookup() was created just for that purpose - fetch a single field value from another table based on a certain key value. However, I found Mapping functionality to work better in those cases. For your example, you can create a "RateMap", based on the Currency (and perhaps date?), and then use function ApplyMap(mapname, expression, default) to replace the Currency Code (or Currency-Date) with the corresponding currency rate.

good luck!

Ask me about Qlik Sense Expert Class!
Not applicable
Author

Hi

Thanks for your help. But in this case I can't use Maps (I know already how to do it), becouse I need to use exchange rates to convert from one currency to another, dependig what a user wants to do. I used for that combination of functions:

FieldValue() and FieldIndex()

but it's not too good for me (sometimes very slow, many times different results than expected)

I think I should maybe go for profesional traning organized by QlikTech. I need more specific knowledge to better understand how QlikView work.

But thank you anyway 🙂

Anonymous
Not applicable
Author

Here is a simple example of using lookup function. See help to follow sintax.

Rgds,
Artjoms