Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

JD
New Contributor

Load one string but not the other

I only want to load Companies with strings containing Sears but not Companies with strings containing Sears and Lowes or just Lowes.  Can you help?

 

DryerDetails:

LOAD * INLINE [

Dryer Model,                    Cost,                      Companies

NED4655EW,                     $398,                     Home Depot Lowes Sears            

WED5000DW,                    $498,                     P.C. Richard & Son Sears

MEDC465HW,                    $498,                     Lowes P.C. Richard & Son

DVE50M7450P,                 $598,                     Sears Lowes

DVE52M7750W,                $999,                     Sears P.C. Richard & Son Home Depot

];

Where WildMatch([Companies],'*Sears*' );

1 Solution

Accepted Solutions
MVP
MVP

Re: Load one string but not the other

May be:

Where WildMatch([Companies],'*Sears*' ) and NOT WildMatch([Companies],'*Lowes*' );
2 Replies
laksyelugoti
New Contributor II

Re: Load one string but not the other

One option is using 2nd Resident load, below is sample code..
1. First load all companies with 'Sears'
2. From above records, Filter out 'Sears' companies with 'Lowes'

DryerDetails_all_Sears:
noconcatenate
Load *
Resident DryerDetails
wildmatch(Companies,'Sears') << Load all companies with 'Sears'

DryerDetails_Final:
noconcatenate
LOAD * Resident DryerDetails_all_sears
NOT wildmatch(Companies,'Lowes') << Load all companies with 'Sears' without 'Lowes'

MVP
MVP

Re: Load one string but not the other

May be:

Where WildMatch([Companies],'*Sears*' ) and NOT WildMatch([Companies],'*Lowes*' );
Community Browser