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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

vlookup in pivot

I need to do lookup to get the result as below marked red column - in excel i would do vlookup(LAST_RMA, RMA:REASON,2,0)

on script level I would do following:

Lookup('REASON', 'RMA',LAST_RMA,'DATA') AS LAST_REASON

but do to the size of data I would prefer to do this in pivot table and not on script basis. I tried match or wild match but nothing seems to work Can you help?

Need to lookup the REASON_ALL if LAST RMA = RMA

RMA REASON LAST_RMA LAST_REASON
100 N01
101 R06 100 N01
102 R06 101 R06
103 R10 102 R06
104 R06 103 R10
105 R05 104 R06
106 R05 105 R05
3 Replies
robert_mika
Master III
Master III

use

Above(LAST_REASON,0,1)

PS.Polska?

Not applicable
Author

Maybe I was not clear enough but LAST_REASON  I just calculated in script as example using

Lookup('REASON', 'RMA',LAST_RMA,'DATA') AS LAST_REASON 

but I would likle to calculate LAST_REASON  in Pivot table or straigt table in the way that i don't need to do it in script. Your way is using LAST_REASON  calculated already in script,

PS. Tak Polska

yura_ratu
Partner - Creator II
Partner - Creator II

Hi Anna,

In fact, you don't need vlookup function here. Just change the link field. Try this script