Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
In continuation to
https://community.qlik.com/t5/New-to-Qlik-Sense/Loop-Match-Load-and-Store/m-p/1854116#M194562
Please let me know , what is wrong with below code . Its fetching 0 records around exists .
LOOPDATA:
LOAD * INLINE [
SRC
EMP1
EMP4
EMP7
];
LET rowText = NoOfRows('LOOPDATA');
for i=1 to $(rowText)
let text = FieldValue('SRC',$(i));
main:
LOAD * ,
'$(text)' as PNN Where Exists('$(text)',FILED2) ;
LOAD * INLINE [
FIELD1, FILED2
ID1, EMP1
ID2, EMP1
ID3, EMP1
ID4, EMP4
ID5, EMP1
ID1, EMP3
ID2, EMP1
ID3, EMP3
ID3, EMP4
ID4, EMP7
ID5, EMP6
ID1, EMP7
];
STORE main into location.............\tbl$(i).qvd ;
next i ;
Exists() uses a fieldname as parameter. You want to test for a value so instead do:
Where FILED2 = '$(text)' ;
Exists() uses a fieldname as parameter. You want to test for a value so instead do:
Where FILED2 = '$(text)' ;
I was trying to achieve this , but it seems not working . Any alternate way ? Please suggest