
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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);
