Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts ,
I do not know how to flag value as 1 or 0 in a table2 based on availability of field value present in another TABLE1 .
TABLE1:
LOAD * INLINE [
Key1, Measure1, Text
A01, 0.675110413, Q
A02, 0.090633909, B
A03, 0.499721274, C
B01, 0.936585255, Q
B02, 0.544804541, A
B03, 0.287134415, C
C01, 0.017603298, A
C03, 0.179289247, A
C05, 0.464438103, B
];
TABLE2:
LOAD * INLINE [
Key, Measure2, REGION
A01, 0.607192136, R1
A02, 0.424057594, R1
B03, 0.224355685, R2
B04, 0.10428929, R1
B05, 0.687693804, R2
C03, 0.833436445, R2
C05, 0.318838755, R3
];
Thank You .
Try this
TABLE1:
LOAD * INLINE [
Key1, Measure1, Text
A01, 0.675110413, Q
A02, 0.090633909, B
A03, 0.499721274, C
B01, 0.936585255, Q
B02, 0.544804541, A
B03, 0.287134415, C
C01, 0.017603298, A
C03, 0.179289247, A
C05, 0.464438103, B
];
TABLE2:
LOAD *,
If(Len(Trim(Lookup('Key1', 'Key1', Key, 'TABLE1'))) > 0, 1, 0) as Flag;
LOAD * INLINE [
Key, Measure2, REGION
A01, 0.607192136, R1
A02, 0.424057594, R1
B03, 0.224355685, R2
B04, 0.10428929, R1
B05, 0.687693804, R2
C03, 0.833436445, R2
C05, 0.318838755, R3
];
Thank You Sir .
So Lookups are there .
Yes, Lookup function does exist in Qlik.
Also, please call me Sunny (no sir needed)