Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

how to eliminate rows based on conditions

Sshasnk
8 - Asteroid

Hi I have a dataset which has four types of product 

1. Apple 

2. Mango

3. strawberry

4 banana 

 

and every product has a different Product Id and account ID

 

Example:

Productaccount id product idCCY
apple 145678123USD
strawberry4571564INR
mango145678123PND
apple4571564ARR
banana145678123PND
strawberry145678123CNY
apple45746852RUB
mango47856419INR

 

Conditions: 

If you will see an apple, mango, and banana (AND condition) have the same account id and product id. I have to eliminate those where ever these three products have the same account id and product id

Exception:

If you will see strawberry also have the same account id and product ID, we don't have to remove those 

 

Output:

 

Productaccount id product idCCY
strawberry4571564INR
apple4571564ARR
strawberry145678123CNY
apple45746852RUB
mango47856419INR
1 REPLY 1
AngelosPachis
16 - Nebula

Hi @Sshasnk ,

 

You can use a summarize tool to group by product ID and account and concatenate the product, and then look which accounts contain appla mango banana. Those you have to exclude, and I chose a join tool to do that,

 

AngelosPachis_0-1616479372620.png

Then you just bring strawberry back in the main data stream.

 

Hope that helps,

 

Angelos

Labels
Top Solution Authors