Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Exclude in script

NoStoreProductAProductBProductCProductDProductEAmount
1StoreAAAAAA99
2StoreAAFFFF2000
3StoreAADDDD300
4StoreAEEEVJ4000
5StoreAETCCU800
6StoreABBBBB999

Hi Community,

I want to exclude row1 and row 6, how should i put it in my script?

LOAD No,

          Store,

          ProductA,

          ProductB,

          ProductC,

          ProductD,

          ProductE,

          Amount

From Excel

where not ProductA=ProductB=ProductC=ProductD= ProductE;

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thanks everyone for your help.

I put like this:

DATA:

LOAD No,

     Store,

     ProductA,

     ProductB,

     ProductC,

     ProductD,

     ProductE,

     Amount

FROM DataSource

WHERE not ((ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE));

View solution in original post

6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

DATA:

LOAD No,

     Store,

     ProductA,

     ProductB,

     ProductC,

     ProductD,

     ProductE,

     Amount,

     If((ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE)  ,1,0) as Flag

FROM

C:\Users\Kaushik\Desktop\Book1.csv

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

Data:

Load No,

     Store,

     ProductA,

     ProductB,

     ProductC,

     ProductD,

     ProductE,

     Amount

Resident DATA where Flag=0;  

Drop table DATA; 

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi,

I would do sth like:

WHERE replace(ProductA & productB, PorductC, ProductD, productE, productA, '') <> ''

The advantage is that you can add a field very easily.

Fabrice

jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

DATA:

LOAD No,

     Store,

     ProductA,

     ProductB,

     ProductC,

     ProductD,

     ProductE,

     Amount

FROM DataSource

WHERE (ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE);

Hope this helps you.

Regads,

Jagan.

Anonymous
Not applicable
Author

Thanks everyone for your help.

I put like this:

DATA:

LOAD No,

     Store,

     ProductA,

     ProductB,

     ProductC,

     ProductD,

     ProductE,

     Amount

FROM DataSource

WHERE not ((ProductA=ProductB) and (ProductB=ProductC) and (ProductC=ProductD)and (ProductD=ProductE));

jagan
Luminary Alumni
Luminary Alumni

Hi,

Missed Not in my where condition, Good Catch.  Anyway close this disucssion.

Regards,

Jagan.

nihhalmca
Specialist II
Specialist II

Hi SurynnChin,

Try this

 

LOAD

No

Store

ProductA

ProductB

ProductC

ProductD

ProductE

Amount

FROM Excel file

Where not No=1 and 6;