In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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