Free Trial

Alteryx Designer Desktop Discussions

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

Conditional Row filtering

Yuri24
8 - Asteroid

Hi,

 

I have a data set as shown below  from which rows need to be filtered. The filter condition is multi condition where if flag is 1 for a partition (by name) then filter or select that row. However if all flag values are same then filter or pick the rows by their oldest date.

NameNumberdateFlag
Oscar123456789001/01/20111
Oscar123456789001/01/20110
Jane Joe234567890101/02/20111
Jane Joe234567890101/02/20111
Jane Joe234567890101/03/20120
Jane Joe234567890101/03/20121
Don Jon345678901203/03/20130
Don Jon345678901203/04/20130
Bill Will456789012304/05/20120
Bill Will456789012304/06/20121
Banner Stark567890123410/10/20201
Banner Stark567890123410/11/20201
Tony Bruce678901234510/20/20211
Tony Bruce678901234510/20/20211

 

 

I need output so only specific rows are filter as shown below

NameNumberdateFlag
Oscar123456789001/01/20111
Jane Joe234567890101/02/20111
Don Jon345678901203/03/20130
Bill Will456789012304/06/20121
Banner Stark567890123410/10/20201
Tony Bruce678901234510/20/20211
    

Thanks in Advance!

4 REPLIES 4
gawa
16 - Nebula
16 - Nebula

hi @Yuri24 

 

First step is to add one more flag column to distinguish whether each Name and Number has all same flag value or not. After that, depending on this new flag value, configure filter condition as you wish. Please refer to the attached WF.

 

image.png

flying008
15 - Aurora

Hi, @Yuri24 

 

A dynamic solution for you , don't need formula:

录制_2023_10_05_10_30_02_447.gif

 

Input    Output   
NameNumberdateFlag NameNumberdateFlag
Oscar123456789001/01/20111 Oscar123456789001/01/20111
Oscar123456789001/01/20110 Jane Joe234567890101/02/20111
Jane Joe234567890101/02/20111 Don Jon345678901203/03/20130
Jane Joe234567890101/02/20111 Bill Will456789012304/06/20121
Jane Joe234567890101/03/20120 Banner Stark567890123410/10/20201
Jane Joe234567890101/03/20121 Tony Bruce678901234510/20/20211
Don Jon345678901203/03/20130     
Don Jon345678901203/04/20130     
Bill Will456789012304/05/20120     
Bill Will456789012304/06/20121     
Banner Stark567890123410/10/20201     
Banner Stark567890123410/11/20201     
Tony Bruce678901234510/20/20211     
Tony Bruce678901234510/20/20211     

 

Yuri24
8 - Asteroid

@flying008 thanks, can you please share the workflow

flying008
15 - Aurora

Hi, @Yuri24 

 

There is almost nothing to set up for the workflow here, just call the tool directly, and you can got it.

Labels
Top Solution Authors