Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
aydiniletisim
Contributor III
Contributor III

Filter only customers does not have USD account

How can i filter customers not having USD account? I want to only see  customer 1001 as result.

 

CUSTOMERID ACCOUNTNUMBER ACCOUNTTYPE
1000 9000 USD
1000 9001 USD
1000 9002 EUR
1001 9003 EUR
1001 9004 GBP
1002 9005 USD
1002 9006 USD
Labels (1)
1 Solution

Accepted Solutions
aydiniletisim
Contributor III
Contributor III
Author

I find a solution

TABLE1:
LOAD
CUSTOMERID as CUSTOMERID1,
CUSTOMERID as CUSTOMERIDTEMP1,
ACCOUNTNUMBER,
ACCOUNTTYPE
FROM [lib://AttachedFiles/sample.xlsx]
(ooxml, embedded labels, table is Sheet1) Where ACCOUNTTYPE = 'USD' ;

TABLE2:
LOAD
CUSTOMERID as CUSTOMERID2,
CUSTOMERID as CUSTOMERIDTEMP2,
ACCOUNTNUMBER,
ACCOUNTTYPE
FROM [lib://AttachedFiles/sample.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

NEwTable1:
LOAD
CUSTOMERID1 as CUSTOMERIDNew,
ACCOUNTNUMBER,
ACCOUNTTYPE
Resident TABLE1
Where Not Exists(CUSTOMERIDTEMP2,CUSTOMERID1);

Concatenate

NewTable2:
Load
CUSTOMERID2 as CUSTOMERIDNew,
ACCOUNTNUMBER,
ACCOUNTTYPE
Resident TABLE2
Where Not Exists(CUSTOMERIDTEMP1,CUSTOMERID2);

DROP Table TABLE1;
Drop Table TABLE2;

View solution in original post

4 Replies
BrunPierre
Partner - Master
Partner - Master

Maybe this

Only({<ACCOUNTTYPE={'*'}-{'USD'}>}CUSTOMERID)

aydiniletisim
Contributor III
Contributor III
Author

I want to filter it while loading data because my data is too much big with USD accounts.

aydiniletisim
Contributor III
Contributor III
Author

This does not work because customer 1000 have USD and non USD accounts

aydiniletisim_0-1665656390705.png

 

aydiniletisim
Contributor III
Contributor III
Author

I find a solution

TABLE1:
LOAD
CUSTOMERID as CUSTOMERID1,
CUSTOMERID as CUSTOMERIDTEMP1,
ACCOUNTNUMBER,
ACCOUNTTYPE
FROM [lib://AttachedFiles/sample.xlsx]
(ooxml, embedded labels, table is Sheet1) Where ACCOUNTTYPE = 'USD' ;

TABLE2:
LOAD
CUSTOMERID as CUSTOMERID2,
CUSTOMERID as CUSTOMERIDTEMP2,
ACCOUNTNUMBER,
ACCOUNTTYPE
FROM [lib://AttachedFiles/sample.xlsx]
(ooxml, embedded labels, table is Sheet1);

 

NEwTable1:
LOAD
CUSTOMERID1 as CUSTOMERIDNew,
ACCOUNTNUMBER,
ACCOUNTTYPE
Resident TABLE1
Where Not Exists(CUSTOMERIDTEMP2,CUSTOMERID1);

Concatenate

NewTable2:
Load
CUSTOMERID2 as CUSTOMERIDNew,
ACCOUNTNUMBER,
ACCOUNTTYPE
Resident TABLE2
Where Not Exists(CUSTOMERIDTEMP1,CUSTOMERID2);

DROP Table TABLE1;
Drop Table TABLE2;