Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jvelasqu3
Contributor
Contributor

Use Where Exists

I would like to use the "Where exists" function, but the field is in text, but when I declare the variable of the values ​​that I need to be loaded, they are in numbers. When I load the script, it doesn't leak information

The script is the following:

 

CD:
LOAD * INLINE [
Centro
8001
8003
8004];


Stock:
LOAD

Centro,
Stock_und
FROM [lib://QLIK/Stock.qvd](qvd)
where Exists(Centro);

 

 

Labels (3)
2 Replies
Chanty4u
MVP
MVP

Try this 

SET vCentro = '8001', '8003', '8004';

CD:

LOAD * INLINE [

Centro

'8001'

'8003'

'8004'

];

 

Stock:

LOAD

    Centro,

    Stock_und

FROM [lib://QLIK/Stock.qvd](qvd)

WHERE Exists(Centro, 'CD');

Kushal_Chawda

@jvelasqu3  you can convert your declared values in text to match with actual field format

CD:
LOAD text(Centro) as Centro;
LOAD * INLINE [
Centro
8001
8003
8004];

Stock:
LOAD
Centro,
Stock_und
FROM [lib://QLIK/Stock.qvd](qvd)
where Exists(Centro);