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.
SOLVED

Rolling Week Filter

MarcusHankinsOptum
6 - Meteoroid

Hello,

 

I have a report that I provide each day and in the report it provides Previous Day results, YTD Results, Month to day results, and Week to Date. My issue is coming from the Week to day. The week is counting as starting on Sunday and ending Saturday. I am trying to come up with an If Statement to get a True or false result and apply the filter to the True.

 

What I need help with is how do I get this formula to give me the results from this previous sunday to current day, but not only that I need It to be rolling so say its Friday 8/14/2020 it would provide me the data from Sunday until Friday and same thing for any day of the week. Lastly it would need do this for each week so if I ran it next Wednesday 8/19/2020 it would give me the True False based on 08/16 to 8/19.

2 REPLIES 2
FláviaB
Alteryx Community Team
Alteryx Community Team

Hi @MarcusHankinsOptum. The best place to get quick help is starting a new topic in our Designer Discussion Board so I am moving your post there. 😉

 

 

Flávia Brancato
Drussek
9 - Comet

I think this will do the job:

IF
   [DateTimeField] >= DateTimeAdd(DateTimeNow(),-1*ToNumber(DateTimeFormat(DateTimeNow(),'%w')), 'days')
   AND [DateTimeField] <= DateTimeNow()
THEN 1
ELSE 0
ENDIF

Labels