Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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?
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
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.
Are you using lookup() in script or a chart expression? Lookup() is a script only function.
-Rob
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
| ID | profID | InvID | DocType |
| 1 | null | null | enq |
| 1 | 1 | null | prof |
| 1 | 2 | null | prof |
| 1 | null | 2 | inv |
| 3 | null | null | enq |
| 4 | null | null | enq |
| 4 | 3 | null | prof |
Regards,