Alteryx Designer Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.
SOLVED

Take the last 8 days worth of data from a file

Hello, I'm trying to take the last 8 days of data based on a column with date in GMT. I want to create a new column in which I have True if the entry is from the last 8 days and False otherwise. This is the formula I"m using:

IF((DATEDIF(TODAY('GMT'), column2, day) < 8), true, false)

 

However, I'm missing something. As you can see from the screenshot below, 28th and 29th of Sep should be true but they are coming up as false. Anything I'm doing wrong?

 

Any help is appreciated and thank you in advance!

1 REPLY 1

Silly mistake on my end.. it works fine with this little tweak: IF((DATEDIF(column2,TODAY('GMT'), day) < 8), true, false) . It needs to have the firts historically occurring date and today's date.