Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Help with removing first 3 days from a Max date Field

JKFoil
7 - Meteor

Hello

Can someone please help me.

 

I have Created a new field, Max Date. I have appended it to the rest of the columns.

 

I now  need to remove rows from a different field referencing the Max Date field  -3 days

 

TimestampMax_ timestamp
2021-03-04T23:59:59Z2021-03-04T23:59:59Z
2021-03-04T09:32:34Z2021-03-04T23:59:59Z
2021-03-03T23:59:59Z2021-03-04T23:59:59Z
2021-03-01T23:59:59Z2021-03-04T23:59:59Z
2021-02-24T23:59:59Z2021-03-04T23:59:59Z
2021-02-21T23:59:59Z2021-03-04T23:59:59Z

 

I would expect to see only the bottom 2 records. 

3 REPLIES 3
jamielaird
14 - Magnetar

Hi @JKFoil ,

 

Here's a workflow which demonstrates how you can do this.

 

jamielaird_0-1615297286327.png

 

 

neilgallen
12 - Quasar

to suggest a different route, a filter with the following condition would also work:

 

 

[timestamp]>= datetimeadd([max_timestamp],-3,'days')

 

 

Provided that the data itself was in a datetime format that is recognized by alteryx. If not, then:

 

 

datetimeparse([timestamp],"%y-%m-%dT%H:%M:%SZ") >= 

datetimeadd(

datetimeparse([Max_ timestamp],"%y-%m-%dT%H:%M:%SZ"),

-3,'days')

 

 

JKFoil
7 - Meteor

Jamielaird

Worked perfect.  Thank you very much.

 

 

Labels