Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

madeleine_josef
New Contributor III

Choosing several specific booking companies

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!

4 Replies
devarasu07
Honored Contributor II

Re: Choosing several specific booking companies

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

Using IN clause in QlikView – Learn QlikView

vinieme12
Esteemed Contributor II

Re: Choosing several specific booking companies

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;



madeleine_josef
New Contributor III

Re: Choosing several specific booking companies

Thank you both, I will try just adding more values like: match([BookingCompany],'12487','xxxxx','yyyyyy')

vinieme12
Esteemed Contributor II

Re: Choosing several specific booking companies

Option 1 is good when you have 10-12 values any more and i would choose Option 2 or Option 3