Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to use a related field in the where clause of my load statement, but if fails.
LOAD
Booking AS BookingId,
Destination AS BookingDestination;
LOAD
IATA as BookingDestination,
ContinentCode as BookingContinentCode;
The following WHERE clause later in the load statement fails becuase "BookingContinentCode" is unkown:
WHERE BookingId = 2134 AND BookingContinentCode = 'EU';
Any help are appreciated!
With regard to :
WHERE MarkupContinent LIKE '*' & BookingDestinationContinentName & '*');
I cannot see a field called BookingDestinationContinentName being added into the TMPINVOICE table that you resident load from with this WHERE
Personally I have never used LIKE in Qlik, I would use Match() or WildMatch() instead, or maybe Exists() depending on your precise needs.
Thanks for trying to help.
Is it necessary to add that to TMPINVOICE?
Actually, I have missed one thing in the Markup table:
Markup:
LOAD
description AS MarkupDesc,
price AS MarkupPrice,
continent as MarkupContinent,
iata as MarkupIata;
And when I do this it works:
Concatenate (Product)
LOAD
InvoiceId,
MarkupDesc AS ProductDescription,
0 AS ProductPrice,
RESIDENT TMPINVOICE WHERE MarkupIata LIKE '*' & BookingDestination & '*');
But when I try to compare with BookingDestinationContinentName instead, it fails.
I suspect a Where Exists() is what you need.
Here is a Blog Post about it Qlik Tips: Does it exist?
And here is the Help section which has some examples
I missed inner joining BookingDestinationGEO table in TMPINVOICE setup.
Thanks for helping out.