Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

Alteryx Designer Desktop Discussions

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

Holiday Issue Filtering

Madzy
7 - Meteor
I currently have this issue with Holiday dates. I deal with Bank data and a bank for some reason doesn't give its data out the day before a holiday and the day of.  (Example this past weekend was long weekend, it didn't give data for Friday and Monday) And I want it to give me data with the following criteria: If today is Tuesday and yesterday was a holiday then give me Fridays data & If today was Monday and Friday was a holiday then give me Thursday data. 
 
This is a rough draft of what I have but I have been playing around and can't seem to get it working. Currently right now I need data from Friday and Yesterday.
If (DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 1) and [Day_status_Code] = "H" then
IF Day_Caption = "Friday" then
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 3) One file (Friday)
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 4) second file (Thursday)
elseif Day_Caption= "Monday" then
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 1) One file (Monday)
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 3) second file (Friday)
endif
ELSEIF (DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 1) and [Day_status_Code] = "W" THEN
IF Datetimeformat(DateTimeToday(),"%a")="Mon" THEN
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 3) For Friday
ELSE DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days")=1 The previous day
ENDIF
endif
 
Any Suggestions or questions is appreciated.
1 REPLY 1
Clifford_Coon
11 - Bolide

Hi @Madzy ,

 

Here is one way:

 

Generate a listing of dates, filter out Weekends and Holidays.

Then process for current date and previous date (no counting involved)

date.jpg

As always, there is a multitude of ways to approach any issue.

Happy Solving.

Labels
Top Solution Authors