Hello,
I'm currently developing a workflow which takes data from a large report and captures data within the current week (Mon-Sun). Is there a tool which will enable me to have the dates automatically updated each week to capture the current week?
I'm thinking of a possible solution as having the start date on a Monday and the capture date being pushed forward every 7 days.
Thanks in advance.
Solved! Go to Solution.
Hi @markdonnelly98 ,
if I understood correctly, you want to determine the date range for the current week to use start date (Monday) and end date (Sunday) as filter for data from a data source? Alteryx DateTime functions can help - I've added a sample workflow to find these days.
Let me know if it works for you.
Best,
Roland
This formula will give you the start of the current week date (Monday)
DATETIMEADD(datetimenow(),-
IF
TONUMBER(DATETIMEFORMAT(datetimenow(),'%w'))=0
THEN 7
ELSE TONUMBER(DATETIMEFORMAT(datetimenow(),'%w'))
ENDIF
+1,'days')
Building on @RolandSchubert's formula, you can append those dates to your data set and use them for a custom filter.
Thanks for your response Roland.
I've attached a sample workflow below.
I basically just want each of the filter dates to be pushed forward by 7 days every 7 days if that makes sense.
E.G In the attached example the filters are capturing dates between 2020-04-20 and 2020-04-26 but starting on Monday I will need them to capture all dates between 2020-04-27 and 2020-05-03.
Kind regards,
Mark
Thanks Blake that worked!
Thanks @markdonnelly98 , that's great!
I'd also suggest marking @RolandSchubert as solved, he provided the formula that I used to build out the rest.