Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load csv file with condition

Hi guys,

Is it doable to load csv file with condition IN ()

LOAD SessionID,

     Url,

     TimeStamp,

     ValidData

FROM

(txt, codepage is 1251, embedded labels, delimiter is ',', msq)

WHERE (SessionID in ($(vValue)))

Order by SessionId, [TimeStamp] ASC;

Thanks,

1 Solution

Accepted Solutions
maxgro
MVP
MVP

example with resident

Table:

LOAD * Inline [

Customer, Date, Mode

A, 01/01/2015, Cash

A, 02/01/2015, CreditCard

A1, 02/01/2015, CreditCard

A1, 03/01/2015, Cash

A1, 04/01/2015, Check

A2, 01/01/2015, Cash

A2, 02/01/2015, CreditCard

B, 02/01/2015, Check

];

let v=chr(39) & 'Cash' & chr(39) & ',' & chr(39) & 'Check' & chr(39);

TableFiltered:

NoConcatenate

load *, 1 as NewField Resident Table

where match(Mode, $(v));

View solution in original post

3 Replies
sinanozdemir
Specialist III
Specialist III

I think it should work if you put the variable within single quotes:

WHERE (SessionID in ('$(vValue)'))

maxgro
MVP
MVP

example with resident

Table:

LOAD * Inline [

Customer, Date, Mode

A, 01/01/2015, Cash

A, 02/01/2015, CreditCard

A1, 02/01/2015, CreditCard

A1, 03/01/2015, Cash

A1, 04/01/2015, Check

A2, 01/01/2015, Cash

A2, 02/01/2015, CreditCard

B, 02/01/2015, Check

];

let v=chr(39) & 'Cash' & chr(39) & ',' & chr(39) & 'Check' & chr(39);

TableFiltered:

NoConcatenate

load *, 1 as NewField Resident Table

where match(Mode, $(v));

Anonymous
Not applicable
Author

Thank you.