Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Lookup Function

Hi,

Now that the Lookup() function is gone, how do I do an easy lookup?

Unique IDColAColBColC
1xxxyyyzzz
2rrrsssttt
3uuuvvvwww

Say I have id=2 and col='ColC'. How do I get to 'ttt' now without creating millions of mapping tables?

Thanks!

22 Replies
rbecher
MVP
MVP

Lookup() can be used in script only..

Astrato.io Head of R&D
Not applicable
Author

Okay, so this won't work here...

Not applicable
Author

Can't believe such a simple function doesn't exist

rbecher
MVP
MVP

Right, I suggest to add a field with this lookup in script level..

Astrato.io Head of R&D
Not applicable
Author

That won't be dynamic enough... Lookup is the simplest function ever, there must be a way to use it in QlikView?!

rogerioqv
Creator II
Creator II

Friend,

Analyze the peek command. I think it will solve your problem.

rbecher
MVP
MVP

You're on an aggregation level in chart. This is very different than on raw data level. I guess you can do something with set analysis and/or Aggr() but therefor one would need more information on the use case itself..

Astrato.io Head of R&D
its_anandrjs

Check this from the help that may help you

lookup(fieldname, matchfieldname, matchfieldvalue [, tablename])

Returns the value of fieldname corresponding to the first occurrence of the value matchfieldvalue in the field matchfieldname.

Fieldname, matchfieldname and tablename must be given as strings (e.g. quoted literals).

The search order is load order unless the table is the result of complex operations such as joins, in which case the order is not well defined.

Both fieldname and matchfieldname must be fields in the same table, specified by tablename. If tablename is omitted the current table is assumed.

If no match is found, null is returned.

Example:

lookup('Price', 'ProductID', InvoicedProd, 'pricelist')

rbecher
MVP
MVP

Why not reading previous answers first?

Astrato.io Head of R&D
Not applicable
Author

Peek is not supported expressions either.