Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

lookup function not recognized

im trying to use the lookup function in qlikview like 'lookup('Price', 'ProductID', InvoicedProd, 'pricelist')' ,
but it keeps giving an error message," Error in Expression". Im using version 8.2. does anyone know whats causing this.

Regards

5 Replies
Not applicable
Author

Is that your expression or is that just from the help? In the Reference Manual, there are single quotes around each parameter. In your example, you don't have quotes around InvoicedProd. Also, you don't want quotes around the whole thing, but I'm guessing you just added those to separate the expression in your post?

Not applicable
Author

Hi NMIller,
its from the manuals, mine one is like this lookup('DocType',"InvoiceID", InvoiceID).

I left the second InvoiceID out of the qoutes coz i want to use the running InvoiceID, that's is invoice for that row.

Regards

Not applicable
Author

Ok. I don't know if you can alternate quote types. I would stick with single quotes, since that is what the manual uses. You may still need to put quotes around the InvoiceId value. I would first verify that it works with a pre-defined value. Hardcode one of your InvoiceIDs in there with quotes around it and see if you still get the error. If so, something else is wrong, if not, then try:

lookup('DocType',"InvoiceID", Chr(39) & InvoiceID & Chr(39))


That should give you the dynamic InvoiceID, but put quotes around it.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Are you using lookup() in script or a chart expression? Lookup() is a script only function.

-Rob

Not applicable
Author

my problem is i have a set or data like , how do i write an expression for

1. All IDs without ProfID,

2. All ProfIDs without InvID

IDprofIDInvIDDocType
1nullnullenq
11nullprof
12nullprof
1null2inv
3nullnullenq
4nullnullenq
43nullprof

Regards,