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

Return most recent date

Colejweinman
7 - Meteor

Hello!

 

I have a request to automate a repot for a colleague. The issue I am having is that the data in this report is usually about 48 hours old.

 

 Is there any way that I can tell Alteryx to just return the most recent day's worth of data? I have everything filtered down, but it's returning all the days within the table.

 

Thanks!

7 REPLIES 7
JohnJPS
15 - Aurora

Sure!  In the Filter tool, compare a date from your DataSet to "DateTimeToday()" or "DateTimeNow()" which can be found under the DateTime functions.

Colejweinman
7 - Meteor

I'm sorry, I'm a bit new, can you explain what you mean by 'Compare'?

JohnJPS
15 - Aurora

I've attached a sample workflow that generates some sample dates and then does a filter based on the current day. Hope it helps!

JoeM
Alteryx Alumni (Retired)

Here is another approach that might be worth trying:

Use a summarize to find the max_date and join that back to the dataset to find all the data from the latest day 

Colejweinman
7 - Meteor

Thanks, John! For some reason this didn't play nice with my data. I appreciate you taking the time!

Colejweinman
7 - Meteor

Thank you, Joe!

JohnJPS
15 - Aurora

@JoeM's solution finds things within a day of the most recent day in the file; mine found things within a day of when you're running the workflow.  Two different interpretations of the question; glad Joe's worked for you!

Labels