Discussion Board for collaboration related to QlikView App Development.
Hi,
I have this scenario, I have Sales Table that consist of kits and individual SKU, now I want to tagged their parent item, so it may be easier for me to link it to kit maintenance. Below are given tables
SOPNUMBER | ITEMNUMBER | LINESEQ | COMPONENTSEQ |
---|---|---|---|
SOP0001 | ITEMA | 1001 | 0 |
SOP0001 | ITEMB | 1001 | 1001 |
SOP0001 | ITEMC | 1001 | 1002 |
SOP0001 | ITEMD | 1002 | 0 |
SOP0001 | ITEME | 1002 | 1002 |
SOP0002 | ITEMB | 1003 | 0 |
SOP0002 | ITEMC | 1003 | 1001 |
SOP0003 | ITEMB | 1004 | 0 |
SOP0003 | ITEMD | 1005 | 0 |
SOP0003 | ITEME | 1005 | 1003 |
Here are the rules:
1) Sort it by SOPNUMBER
2) Sort it by LINESEQ
3) Start tagging using rules below:
a) If LINESEQ is EQUAL TO ABOVE LINESEQ then, get the previous ITEMNUMBER where COMPONENTSEQ is 0, else just simply get the current ITEMNUMBER; 0 meaning this is the parent item or an individual item;
See results below:
SOPNUMBER | ITEMNUMBER | LINESEQ | COMPONENTSEQ | TAGGED |
---|---|---|---|---|
SOP0001 | ITEMA | 1001 | 0 | ITEMA |
SOP0001 | ITEMB | 1001 | 1001 | ITEMA |
SOP0001 | ITEMC | 1001 | 1002 | ITEMA |
SOP0001 | ITEMD | 1002 | 0 | ITEMD |
SOP0001 | ITEME | 1002 | 1002 | ITEMD |
SOP0002 | ITEMB | 1003 | 0 | ITEMB |
SOP0002 | ITEMC | 1003 | 1001 | ITEMB |
SOP0003 | ITEMB | 1004 | 0 | ITEMB |
SOP0003 | ITEMD | 1005 | 0 | ITEMD |
SOP0003 | ITEME | 1005 | 1003 | ITEMD |
What will be the new key to link it to other table is the compound key of: TAGGED + ITEMNUMBER - since I already got the parent item, so this will be unique... My problem now is how to do complex tagging.
Please help me solve this. Thanks.
Regards,
Bill
See attached qvw.