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.

How to pick date from previous day excluding weekends and filter some data

ArijitRoy
8 - Asteroid

Hi,

 

I need help on the attached data. I want to select the previous date data and skip weekends. I have applied the below formula.

 

if DateTimeFormat(DateTimeToday(),"%A")="Tuesday"

then DateTimeAdd(DateTimeToday(),-4,"days")

else DateTimeAdd(DateTimeToday(),-1,"days")

endif

 

There is an issue. I have to filter Received Date and have to select all the dates except 10/10/2022 (Monday). I have used the above formula in the Formula Tool and after that I have to use the Filter tool to de-select 10/10/2022 and it should work if today is Tuesday then should skip today and pick date from yesterday. Also, want to select 10/10/2022 and Blanks from Completed date column. I am unable to find the solution for this. Please help. 

3 REPLIES 3
Luke_C
17 - Castor
17 - Castor

Hi @ArijitRoy 

 

Can you share the workflow and expected output? Why is your formula focused on Tuesday? Wouldn't you want to check if it's Monday and take the date 3 days ago? 

ArijitRoy
8 - Asteroid

Sorry, because it is Tuesday today that is why I have used "Tuesday" to get Friday's date.

 

if DateTimeFormat(DateTimeToday(),"%A")="Monday"

then DateTimeAdd(DateTimeToday(),-3,"days")

else DateTimeAdd(DateTimeToday(),-1,"days")

endif

ArijitRoy
8 - Asteroid

I have attached the output file that I am looking for.

Labels
Top Solution Authors