In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
Start Free Trial

Alteryx Designer Desktop Discussions

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

duplicate data, need to keep oldest date

LRC
6 - Meteoroid

I have a large amount of data that is repeated and I want to use Alteryx to remove the duplicates but my skills are still very new.  Can someone please help guide me - I have six columns of data and if they match other rows, I want to delete all dates except for the first occurrence (oldest).

 

I want to keep the rows with 7/7/2021 and delete 7/14/2021 and 7/28/2021.  Pretty simple, right?!! 🙂  Thanks!!

 

LRC_0-1628807283380.png

 

4 REPLIES 4
deepashah
7 - Meteor

Hi LRC!

 

Please see the attached workflow, which should match what you're looking for. To help explain each step in the attached:

 

  1. Input: Add the Excel file
  2. Select: Change the "SUPPLIER_SITE" column to a V_String type field like all of the other fields
  3. Sort: To make sure the first occurring date stays when we delete duplicate, we have to sort the Date by Ascending
  4. Formula: This adds a new column and puts all the combined information into this column
  5. Unique: This finds our duplicates based on the combined info (from the Formula tool in the previous step)
  6. Select: Unselect the combined info column that we added. Also, change the "SUPPLIER_SITE" column back to a Double type field, how it was before
  7. Output: This is our solution!

 

I hope this helps solve what you're looking for - please let me know if there's anything I can clarify!

 

 

messi007
15 - Aurora
15 - Aurora

@LRC,

 

a unique tool will do the job for you 🙂

 

Please see below

 

messi007_0-1628840160706.png

Hope this helps!

Attached the workflow.

Regards,

atcodedog05
22 - Nova
22 - Nova

Hi @LRC 

 

Here is couple of ways you can do it.

 

Workflow:

atcodedog05_0-1628841317250.png

 

Method - 1. Using unique tool to keep first occurence.

Method - 2. Using sample tool to keep first row of the group.

Method - 3. Using summarize to get first row of group. 

 

Hope this helps : )

 

 

HomesickSurfer
12 - Quasar

Hi @LRC 

 

Use summary tool, configure as below

 

Capture.PNG

Labels
Top Solution Authors