Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

vLookup as expression (within unconnected tables)

Hi Community,

i'm facing with a "big problem". I' can't sleep

I want to get some values in the main table (similar to Excel:vlookup) from another table using an expression.

I can't get the desired values using  Scripts(datamodel) because the 2 tables (data & matrix, see attached .qvw) are not directly connected:the  "Key Fields" in table1 are calculated after running script, based on expressions:

The Expressions (i.e PARETO EFFICIENCY)  are something like that:

=if

(rangesum(above(total sum(QTY),0,Rowno())) /sum(total <SubCategory> QTY)>0.95,'C',

if

(rangesum(above(total sum(QTY),0,Rowno()))/sum(total <SubCategory> QTY)>0.80,'B',

'A'))

GOAL:

My goal is to link  the right values of column PRICE_LEVEL#01, PRICE_LEVEL#02,PRICE_LEVEL#03 (table2)  to the main table 1.

PS: I would like to avoid IF statement , because i have 48 combinations of values.

Please, i need help.

Thanks to all

Tags (3)
6 Replies
amayuresh
Contributor III

Re: vLookup as expression (within unconnected tables)

Check this link: https://community.qlik.com/message/1005112#1005112

May help you. I think, lookup function will help you.

MVP
MVP

Re: vLookup as expression (within unconnected tables)

Not sure if your sample shows what you describe above, the two tables are linked in the data model, and there is already a classification field present in the table.

Not applicable

Re: vLookup as expression (within unconnected tables)

i've now loaded the right qvw.

Not applicable

Re: vLookup as expression (within unconnected tables)

You're right Swuehl....

(i've now loaded the right qvw.)

Thank you.

joydipp1988
Contributor

Re: vLookup as expression (within unconnected tables)

Hi Mark,

I really didn't understand your problem. Let's think simpler ways. Can you please tell us what your input data set look like and what you want as an output ??? If you understand your requirement then some dummy entries you can provide. Cheers...

Regards,

Joy

MVP
MVP

Re: vLookup as expression (within unconnected tables)

You probably request that your ITEM field values in the chart should be sorted by your expression or is this done somehow in the script?

Community Browser