In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Selecting Unique Records from a sheet, based on Date in a column

Gandalf_NotGrey
8 - Asteroid

 

Hi,

 

I have a problem that I need help with. Any suggestion will be much appreciated.

From Workflow A, at the end of every day, a file is getting created which is gets saved in a folder M. (The data in this file has trades with settlement date before today.)

Everyday this workflow runs, and this file keeps getting saved.

On the last working day of the month, workflow B runs, and it pulls all the files from this folder M. Now, the task is to create a new excel sheet, which has the trades (unique) from this folder M. But many trades occur on multiple days which results in duplicity. My objective is to pick all the trades from all the sheets in folder M and in case of duplicate trades, keep only those, which has the most recent settlement date.

So, for example, let's assume that Trade 1 was in the excel sheet on day 1, day 2, day 3, day 4 & day 5. On month-end, workflow B ran, and this Trade 1 is there 5 times. Now, what I want is to only take the latest instance of this trade, that is, the one which came on the day 5 sheet.

Hope, I have not confused you with this.

Thank You so much reading this. I have attached a sample sheet which mimics the data.

1 REPLY 1
JamesCharnley
13 - Pulsar

Hi @Gandalf_NotGrey 

 

I'm not 100% this is what you're asking for so feel free to ask questions, but the sample tool can be used to take the Last N records, in this case 1, grouped by whatever we want. So if we checked everything but the date in group by (or everything that indicates a unique trade), it would only take the last date for every trade, assuming the dates are already in ascending order.

 

JamesCharnley_0-1668605853247.png

 

Labels
Top Solution Authors