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

Alteryx Designer Desktop Discussions

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

Delete Rows based on User and dynamic Date fixed by User

JeffJeffrey12
7 - Meteor

Dear Community,

 

I am trying to solve an issue I couldn't find an easy answer yet myself for.

 

Imagine the following dataset of raw data:

 

Raw Data                                                     How I need it

NameDateDate Started NameDateDate Started
A01.01.202203.01.2022 A03.01.202203.01.2022
A02.01.202203.01.2022 A04.01.202203.01.2022
A03.01.202203.01.2022 A05.01.202203.01.2022
A04.01.202203.01.2022 A06.01.202203.01.2022
A05.01.202203.01.2022 A07.01.202203.01.2022
A06.01.202203.01.2022 A08.01.202203.01.2022
A07.01.202203.01.2022 A09.01.202203.01.2022
A08.01.202203.01.2022 A10.01.202203.01.2022
A09.01.202203.01.2022 B05.01.202205.01.2022
A10.01.202203.01.2022 B06.01.202205.01.2022
B01.01.202205.01.2022 B07.01.202205.01.2022
B02.01.202205.01.2022 B08.01.202205.01.2022
B03.01.202205.01.2022 B09.01.202205.01.2022
B04.01.202205.01.2022 B10.01.202205.01.2022
B05.01.202205.01.2022 C01.01.202231.12.2021
B06.01.202205.01.2022 C02.01.202231.12.2021
B07.01.202205.01.2022 C03.01.202231.12.2021
B08.01.202205.01.2022 C04.01.202231.12.2021
B09.01.202205.01.2022 C05.01.202231.12.2021
B10.01.202205.01.2022 C06.01.202231.12.2021
C01.01.202231.12.2021 C07.01.202231.12.2021
C02.01.202231.12.2021 C08.01.202231.12.2021
C03.01.202231.12.2021 C09.01.202231.12.2021
C04.01.202231.12.2021 C10.01.202231.12.2021
C05.01.202231.12.2021    
C06.01.202231.12.2021    
C07.01.202231.12.2021    
C08.01.202231.12.2021    
C09.01.202231.12.2021    
C10.01.202231.12.2021    

 

I have a low of rows with multiple users of each day with some information and can add a column "Date Started" via VLOOKUP inside Alteryx or have it stored in some kind of Filter - depends on how to solve this issue.

 

I want to delete all rows of the specific user that are before the "Date Started" value so it looks like the table on the right side.

 

Unfortunatly I couldn't find a way to solve it yet myself but maybe someone of you has an easy idea for this.

 

Thanks in advance.

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @JeffJeffrey12 

 

This is how you can get the expected output. But I am not very clear about the requirement though.

 

Workflow:

atcodedog05_0-1641992570400.png

 

Or

 

atcodedog05_0-1641992745591.png

 

Hope this helps : )

 

GGodfrey
6 - Meteoroid

Hi Jeff,

 

I've attached a workflow that I believe solves the problem you have posed.

 

The main steps are as follows:

1. Convert the Date and Date Started fields into the YYYY-MM-DD format so they can be converted to a date data type

2. Convert the Date and Date Started fields to a date data type

3. Utilise the custom filter option within the Filter tool to dynamically filter for Date values that do not occur before the Date Started values

 

Hope this helps!

JeffJeffrey12
7 - Meteor

Wow, its actually that easy that I just was thinking too hard.

 

Thank you both!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @JeffJeffrey12 

Cheers and have a nice day!

Labels