Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
There's still time to register for the Q3 ACE Panel - Spatial Edition presentation tomorrow! | Need more information about the event? Check out the post here

Delete rows based on specific conditions

Highlighted
7 - Meteor

Hi,

 

I have a dataset similar to below and I need to include/exclude the rows based on specific conditions mentioned below the table. Please suggest how to get this done

 

Input data
ServiceIDSTATUSSystem ID
JP00231DECOMMISSION78967AA
JP00231DECOMMISSION33225QW
JP00231DECOMMISSION99317RT
JP00231DECOMMISSION42214YG
JP00231DECOMMISSION89874FC
JP00231LIVE01003TF
JP00231LIVE23553KL
JP00231LIVE65758SD
JP00231LIVE59631SA
IU00667LIVE12985WQ
IU00667LIVE71213ER
IU00667LIVE43121DE
IU00667LIVE32431GJ
DF00445DECOMMISSION82436VB

 

Expected Output
ServiceIDSTATUSSystem ID
JP00231LIVE01003TF
JP00231LIVE23553KL
JP00231LIVE65758SD
JP00231LIVE59631SA
IU00667LIVE12985WQ
IU00667LIVE71213ER
IU00667LIVE43121DE
IU00667LIVE32431GJ
DF00445DECOMMISSION82436VB

 

1) If a ServiceID has both LIVE & Decommission status, then the rows with "Decommission" status for that ServiceID to be deleted

2)  If a ServiceID has only LIVE status and no "Decommission" status, then rows with LIVE status to be retained.

3) If a ServiceID has only Decommission status and no LIVE status, then rows with Decommission status to be retained.

Highlighted
Alteryx
Alteryx

hi @Preet2020 ,

 

are you looking for something like this? 

bpatel_0-1595952737395.png

 

Highlighted
7 - Meteor

Unfortunately no, depending on the Service ID & its status the rows to be included/excluded

Highlighted
Alteryx
Alteryx

@Preet2020 ,

 

could you share what your outcome would look like please?

Highlighted
7 - Meteor

Yes, I have updated the post with the expected output

Highlighted
Alteryx
Alteryx

@Preet2020 ,

 

you can deselect the last column. the best way to remove rows is through filtering them out based on each condition you have. i sampled the first condition you said as an example to get the result. hope this helps

bpatel_0-1595953995603.png

 

Highlighted
7 - Meteor

The actual dataset that I have is way huge so not sure if and how the filter conditions needs to be applied to get the desired output

Labels