Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following dataload:
[Assignment]:
LOAD
[BookingDate],
[SalesPerson],
[AlfaCompany],
[AssignmentNumber],
[AssignmentNumber] as InvoiceLink,
[AssignmentType],
[BookingCompany],
[BookingCompanyName],
[OpenOrClosed],
[Assignee],
[OriginCity],
[OriginCountryCode],
[DestinationCity],
[DestinationCountryCode],
[LoadingDate],
Year (LoadingDate) as LoadingYear,
Month (LoadingDate) as LoadingMonth,
[UnloadingDate],
[SurveyDate],
[Volume],
[PriceCompanyCurrency],
[MoveManager]
FROM [lib://QvdLib (alfa_qliksense)/Prod\Load\AlfaAssist.qvd]
(qvd)WHERE [BookingDate]> makedate(2015)AND match([BookingCompany],'12487')
How can I write to pick several Booking companies? I.e I want the report to show data on more than customer 12487.
Thanks!
Hi,
Is your [BookingCompany] has only Customer (12487)?
if you wish to add multiple booking company in where clause (example A, B, C are another values)
match([BookingCompany],'12487','A','B','C')
or you can aslo remove [BookingCompany] condition then it will show everything.
check this article, it will be very useful for you
Option 1:
You can add more values to Match()
match([BookingCompany],'12487','xxxxx','yyyyyy')
Option 2:
Create a Mapping table for the Booking Companies you want to keep and Use applymap() to verify in where clause
example
Map_INCLUDE:
Mapping Load * inline [
Company,IncludeFlag
12487,1
xxxxx,1
yyyyy,1
];
LOAD *
WHERE [BookingDate]> makedate(2015) AND Applymap('Map_INCLUDE',[BookingCompany],0)=1;
Option 3:
Understanding Join, Keep and Concatenate
Using the KEEP() keyword to keep only relevant records
LOAD *
WHERE [BookingDate]> makedate(2015) ;
INNER KEEP
INCLUDECompany:
Load * inline [
[BookingCompany]
12487
xxxxx
yyyyy
];
drop table INCLUDECompany;
Thank you both, I will try just adding more values like: match([BookingCompany],'12487','xxxxx','yyyyyy')
Option 1 is good when you have 10-12 values any more and i would choose Option 2 or Option 3