Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
can we implement vlookup in qlikview?
Hi
There is no direct equivalent of vLookup as a function in QlikView, it would be better for you to explain what you want to achieve and perhaps post a small sample QVW with some explanation so we might be able to help. Whilst there is no vLookup, if we know what you want to do then we might be able to help.
Cheers,
Try looking @ Mapping Load and Applymap(). This is very usefull for getting the description of a code into your table.
Hi there is a function called lookup......please see the definition below. I have used this in the script to perform a lookup, I am not sure whether it works through the UI if thats what you need
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.
lookup('Price', 'ProductID', InvoicedProd, 'pricelist')
Hi Tom ,
We used Lookup function in our application many times.
If you can state your doubt , i will try my best to solve it.
Cheers
Bhushan N
but I want to warn that Lookup() function in QlikView works very slowly. And if you have huge volume of data I don't advise to use this function.
Hi, bnirgude
tab1:
ID,ID1,NAME
IN THIS ID ,ID1 has some comm values and find out if id's are matched or not using lookup function.
please reply.
Hello,
You can use the exists() function to check for already loaded values:
tab1: ID, ID1, NAME, IF(EXISTS(ID), 1, 0) AS ID_REP FROM ...
Is this what you are looking for?
Thanks Miguel for reply.
can you tell me how to do the abow apply.. using ' lookup' function.
Hello,
Take into account Anatoly's suggestion about performance in the load script. Anyway, the code will look like
LookUp('ID1', 'ID', ID1, 'tab1') AS ID_REP
Will return the value for ID1 when ID equals to current ID1, or null if there is no correspondence. It doesn't make much sense to me, though, because this is a value you already have loaded.
Regards.