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

How create self-tagging in Qlikview script?

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

SOPNUMBERITEMNUMBERLINESEQCOMPONENTSEQ
SOP0001ITEMA10010
SOP0001ITEMB10011001
SOP0001ITEMC10011002
SOP0001ITEMD10020
SOP0001ITEME10021002
SOP0002ITEMB10030
SOP0002ITEMC10031001
SOP0003ITEMB10040
SOP0003ITEMD10050
SOP0003ITEME10051003

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:

SOPNUMBERITEMNUMBERLINESEQCOMPONENTSEQTAGGED
SOP0001ITEMA10010ITEMA
SOP0001ITEMB10011001ITEMA
SOP0001ITEMC10011002ITEMA
SOP0001ITEMD10020ITEMD
SOP0001ITEME10021002ITEMD
SOP0002ITEMB10030ITEMB
SOP0002ITEMC10031001ITEMB
SOP0003ITEMB10040ITEMB
SOP0003ITEMD10050ITEMD
SOP0003ITEME10051003ITEMD

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

1 Solution

Accepted Solutions

Re: How create self-tagging in Qlikview script?

See attached qvw.


talk is cheap, supply exceeds demand
1 Reply

Re: How create self-tagging in Qlikview script?

See attached qvw.


talk is cheap, supply exceeds demand
Community Browser