We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Getting the Last 6 Days

KamenRider
11 - Bolide

Guys,

 

I'd like to ask for your help in getting the last 6 days. I have attached the data file for your reference. In my example, I should be getting June 18 to June 26.

 

Looking forward for your response. Thanks.

 

Kamen

5 REPLIES 5
Christina_H
14 - Magnetar

image.png

Convert date to standard format, then filter.  I've taken previous 6 days from today, which is 21-26 June, but you can adjust the formula if that isn't what you need.

Filter: [DateTime_Out]>=DateTimeAdd(DateTimeToday(),-6,"day")

binuacs
21 - Polaris

@KamenRider if you want the last 6 days' records, you can use the formula provided by @Christina_H  or if you want the last 6 dates, then you can use the attached workflow

binuacs_0-1750934341181.png

 

KamenRider
11 - Bolide

Hi @Christina_H 

 

The dates resulted to missing dates. I should be seeing 6 days. Below shows only 4 dates. Please advise.

 

misisng date.PNG

 

Kamen

davidskaife
14 - Magnetar

Hi @KamenRider 

 

You may need to clarify if you want 6 days from today's date, or from the last date within the data?

 

Assuming you want the last 6 days from the data you could do the below which converts the Date field into the standard format, then grouping by the dates adds in a RecordID which is then joined back onto the main data stream. Finally filter out where RecordID is less than or equal to 6, sort and tidy up.

 

Screenshot 2025-06-26 113722.png

 

This will return the last 6 days worth of data based on the dataset. If you had data for the 26/6 then it would start at the 18/6

 

Workflow attached

 

KamenRider
11 - Bolide

Magnificent @davidskaife . You got it! Thank you so much.

 

Kamen

 

Labels
Top Solution Authors