Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a question regarding scripting.. I do not know how to implement this one on qlikview..
I have 2 tables:
table1:
Field1 | Field2 | KEY | CODE |
abc | abc | XYZ | X |
abc | abc | XYZ | Y |
abc | abc | XYZ | Z |
abc | abc | ABCD | A |
abc | abc | ABCD | B |
abc | abc | ABCD | C |
abc | abc | TST | T |
abc | abc | TST | S |
table2:
KEY | CODE1 | CODE2 | CODE3 | CODE4 |
XYZ | X | Y | Z | |
ABCD | A | B | C | D |
TST | T | S |
What I want to happen is, I want to create a flag telling me that the data on table1 is complete.
for example:
KEY XYZ, codes are: X,Y,Z which is present in table2 (CODE1, CODE2, CODE3)
now for KEY ABCD, only codes: A,B, and C is present which makes its flag to incomplete.
As for KEY TST, the codes T and S is both present in table which makes its flag to complete.
How can I achieve this? How can I concatenate the CODE field in table1 to match both tables?
Regards,
Lyn
Hi Lyn,
Hope it helps you
T4:
LOAD KEY,Concat(Val) as Con Resident T3 Group By KEY
;
Join
T5:
LOAD KEY,
Concat(CODE) as Con1
Resident T1
Where Exists(Val,CODE)
Group By KEY
;
Cheers!!
Jagan