Alteryx Designer Desktop Discussions

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

How do I remove the row with the older date from a spreadsheet

JoshuaElphee
8 - Asteroid

I have a workbook that has numerous columns.  I am identifying the duplicate rows (duplicate in column "Project"), and of these duplicate rows, I need to remove the one with the oldest date:

Projectnamedate$NOTE IF NEED TO REMOVE

abc

JP10/1/202249Duplicate (Keep)
abcJP9/3/202236Duplicate (Remove)
debAlf8/7/202282 
xyzFred6/12/202227Duplicate (Remove)
xyzFred12/30/202230Duplicate (Keep)

 

How do I remove the rows with the oldest date from this error report (want to throw error only on the most recent date)?  I do not yet have the rightmost column in existence; if I did a simple filter would work :D.

4 REPLIES 4
binuacs
20 - Arcturus

@JoshuaElphee 

One way of doing this

image.png

Yoshiro_Fujimori
15 - Aurora

Hi @JoshuaElphee ,

 

My solution.

If you want to keep the original order, you may add Record ID in the beginning.

 

Workflow

1255058_Workflow.png

Expression in the 2nd Multi-Row Formula

IF [SeqNo] > 1
THEN "Duplicate (Keep)"
ELSEIF [Project] != [Row+1:Project]
THEN ""
ELSE "Duplicate (Remove)"
ENDIF

flying008
14 - Magnetar

Hi, @JoshuaElphee 

 

Another way for you:

 

录制_2024_03_26_08_04_10_219.gif

usmanbashir
11 - Bolide

@JoshuaElphee - I typically use the unique tool to remove the duplicates if I'm able to use a sort. From my experience, the unique tool maintains the first record of a dup. In this example, if you sort by project and date (descending), then unique tool on [Project], it will keep the record with most recent date. If a Project has more then 2 records, it will still only retain the most recent date. Hope that helps!

 

2024-03-25_20-38-18.png

Labels